Mercurial > pidgin.yaz
changeset 13704:1a1248de26ed
[gaim-migrate @ 16107]
Free message before returning from the function.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 29 Apr 2006 19:20:28 +0000 |
parents | d2e5a9f2c174 |
children | 2f7b356812bc |
files | src/ntlm.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ntlm.c Sat Apr 29 18:50:28 2006 +0000 +++ b/src/ntlm.c Sat Apr 29 19:20:28 2006 +0000 @@ -119,6 +119,7 @@ gchar * gaim_ntlm_gen_type1(const gchar *hostname, const gchar *domain) { + gchar *tmp; char *msg = g_malloc0(sizeof(struct type1_message) + strlen(hostname) + strlen(domain)); struct type1_message *tmsg = (struct type1_message*)msg; tmsg->protocol[0] = 'N'; @@ -138,7 +139,9 @@ memcpy(msg+sizeof(struct type1_message),hostname,strlen(hostname)); memcpy(msg+sizeof(struct type1_message)+strlen(hostname),domain,strlen(domain)); - return gaim_base64_encode((guchar*)msg, sizeof(struct type1_message) + strlen(hostname) + strlen(domain)); + tmp = gaim_base64_encode((guchar*)msg, sizeof(struct type1_message) + strlen(hostname) + strlen(domain)); + g_free(msg); + return tmp; } guint8 *