diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sss_client/group.c | 3 | ||||
-rw-r--r-- | src/sss_client/passwd.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/sss_client/group.c b/src/sss_client/group.c index e1b36e2a..60b4611c 100644 --- a/src/sss_client/group.c +++ b/src/sss_client/group.c @@ -235,6 +235,7 @@ enum nss_status _nss_sss_initgroups_dyn(const char *user, gid_t group, *start += 1; } + free(repbuf); return NSS_STATUS_SUCCESS; } @@ -274,6 +275,7 @@ enum nss_status _nss_sss_getgrnam_r(const char *name, struct group *result, /* only 1 result is accepted for this function */ if (((uint32_t *)repbuf)[0] != 1) { *errnop = EBADMSG; + free(repbuf); return NSS_STATUS_TRYAGAIN; } @@ -325,6 +327,7 @@ enum nss_status _nss_sss_getgrgid_r(gid_t gid, struct group *result, /* only 1 result is accepted for this function */ if (((uint32_t *)repbuf)[0] != 1) { *errnop = EBADMSG; + free(repbuf); return NSS_STATUS_TRYAGAIN; } 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; } |