stanza: handle EMEM in xmpp_stanza_set_name()

This commit is contained in:
Dmitry Podgorny
2015-10-20 16:25:56 +03:00
parent d460a5eb16
commit c012f20c99

View File

@@ -478,7 +478,7 @@ int xmpp_stanza_set_name(xmpp_stanza_t *stanza,
stanza->type = XMPP_STANZA_TAG;
stanza->data = xmpp_strdup(stanza->ctx, name);
return XMPP_EOK;
return stanza->data == NULL ? XMPP_EMEM : XMPP_EOK;
}
/** Get the stanza name.