From c012f20c99f4d2c4516ca9ac372ac15816c6f3a6 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Tue, 20 Oct 2015 16:25:56 +0300 Subject: [PATCH] stanza: handle EMEM in xmpp_stanza_set_name() --- src/stanza.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stanza.c b/src/stanza.c index f4e9a64..a3783bc 100644 --- a/src/stanza.c +++ b/src/stanza.c @@ -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.