Module Name: src
Committed By: shm
Date: Tue Jan 30 15:28:39 UTC 2018
Modified Files:
src/crypto/external/bsd/libsaslc/dist/src: mech_digestmd5.c
Log Message:
Fixed memory leak (CID: 977744)
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.12 src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.13
--- src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.12 Tue Jan 30 13:11:28 2018
+++ src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c Tue Jan 30 15:28:39 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_digestmd5.c,v 1.12 2018/01/30 13:11:28 shm Exp $ */
+/* $NetBSD: mech_digestmd5.c,v 1.13 2018/01/30 15:28:39 shm Exp $ */
/* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -35,7 +35,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: mech_digestmd5.c,v 1.12 2018/01/30 13:11:28 shm Exp $");
+__RCSID("$NetBSD: mech_digestmd5.c,v 1.13 2018/01/30 15:28:39 shm Exp $");
#include <sys/param.h>
@@ -860,7 +860,7 @@ choose_realm(saslc_sess_t *sess, const c
{
const char *user_realms;
list_t *l;
- char *p;
+ char *p = NULL;
/*****************************************************************/
/* The realm containing the user's account. This directive is */
@@ -926,6 +926,7 @@ choose_realm(saslc_sess_t *sess, const c
return p;
}
use_1st_realm:
+ free(p);
if ((p = strdup(realms->value)) == NULL)
goto nomem;
return p;