From 7d2f90122754a2b0ef21671d68a9fa98fbe8d4a8 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 10 Jun 2010 11:16:16 +0200 Subject: Potential memory leak in _nss_sss_*_r() Fixes: #516 --- src/sss_client/passwd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sss_client/passwd.c') diff --git a/src/sss_client/passwd.c b/src/sss_client/passwd.c index aa5c7602..95c7de61 100644 --- a/src/sss_client/passwd.c +++ b/src/sss_client/passwd.c @@ -208,6 +208,7 @@ enum nss_status _nss_sss_getpwnam_r(const char *name, struct passwd *result, /* only 1 result is accepted for this function */ if (((uint32_t *)repbuf)[0] != 1) { *errnop = EBADMSG; + free(repbuf); return NSS_STATUS_TRYAGAIN; } @@ -259,6 +260,7 @@ enum nss_status _nss_sss_getpwuid_r(uid_t uid, struct passwd *result, /* only 1 result is accepted for this function */ if (((uint32_t *)repbuf)[0] != 1) { *errnop = EBADMSG; + free(repbuf); return NSS_STATUS_TRYAGAIN; } -- cgit