From 442699c9edec2f3e4243b322f4adc81ece6c4c83 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 20 Jun 2019 13:55:01 +0000 Subject: Holy memory leaks, Batman --- src/libnsss/nsss_unix_getgrnam_r.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libnsss/nsss_unix_getgrnam_r.c') diff --git a/src/libnsss/nsss_unix_getgrnam_r.c b/src/libnsss/nsss_unix_getgrnam_r.c index bc63d78..05970d0 100644 --- a/src/libnsss/nsss_unix_getgrnam_r.c +++ b/src/libnsss/nsss_unix_getgrnam_r.c @@ -25,10 +25,12 @@ int nsss_unix_getgrnam_r (char const *name, struct group *gr, char *buf, size_t nsss_unix_grp_end(&a) ; 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) ; -- cgit v1.2.3