- silc_buffer_unformat(buffer,
- SILC_STR_UI_SHORT(&payload_len),
- SILC_STR_UI_CHAR(&new->cmd),
- SILC_STR_UI_CHAR(&args_num),
- SILC_STR_UI_SHORT(&new->ident),
- SILC_STR_END);
+ ret = silc_buffer_unformat(buffer,
+ SILC_STR_UI_SHORT(&payload_len),
+ SILC_STR_UI_CHAR(&new->cmd),
+ SILC_STR_UI_CHAR(&args_num),
+ SILC_STR_UI_SHORT(&new->ident),
+ SILC_STR_END);
+ if (ret == -1) {
+ silc_free(new);
+ return NULL;
+ }