summaryrefslogtreecommitdiff
path: root/src/libnsss/nsss_switch_getgrgid_r.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-06-20 13:55:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-06-20 13:55:01 +0000
commit442699c9edec2f3e4243b322f4adc81ece6c4c83 (patch)
tree0015603c7e4289dd26cb5d71d14884481bb9951b /src/libnsss/nsss_switch_getgrgid_r.c
parent4d93571ced7ecd1cfe4d3c78e940a383816dcae1 (diff)
downloadnsss-442699c9edec2f3e4243b322f4adc81ece6c4c83.tar.xz
Holy memory leaks, Batman
Diffstat (limited to 'src/libnsss/nsss_switch_getgrgid_r.c')
-rw-r--r--src/libnsss/nsss_switch_getgrgid_r.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libnsss/nsss_switch_getgrgid_r.c b/src/libnsss/nsss_switch_getgrgid_r.c
index c87b57d..2eb4855 100644
--- a/src/libnsss/nsss_switch_getgrgid_r.c
+++ b/src/libnsss/nsss_switch_getgrgid_r.c
@@ -26,10 +26,12 @@ int nsss_switch_getgrgid_r (gid_t gid, struct group *gr, char *buf, size_t bufle
nsss_switch_end(&a, NSSS_SWITCH_GRP) ;
if (!nsss_grp_copy(gr, buf, buflen, &gr2, sa.s, sa.len, genalloc_s(char *, &ga), genalloc_len(char *, &ga)))
{
+ genalloc_free(char *, &ga) ;
stralloc_free(&sa) ;
*grp = 0 ;
return errno ;
}
+ genalloc_free(char *, &ga) ;
stralloc_free(&sa) ;
*grp = gr ;
return (errno = e, 0) ;