1
0
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

ox: fix memleak in ox_announce_public_key

This commit is contained in:
Michael Vetter 2021-03-25 17:02:59 +01:00
parent 8df5e99981
commit a1a37cf9bf

View File

@ -118,7 +118,9 @@ ox_announce_public_key(const char* const filename)
xmpp_stanza_t* item = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(item, STANZA_NAME_ITEM);
xmpp_stanza_set_attribute(item, STANZA_ATTR_ID, _gettimestamp());
char *timestamp = _gettimestamp();
xmpp_stanza_set_attribute(item, STANZA_ATTR_ID, timestamp);
free(timestamp);
xmpp_stanza_t* pubkey = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(pubkey, STANZA_NAME_PUPKEY);