Skip to content

Commit

Permalink
Fix memleak in _nss_winbind_initgroups_dyn
Browse files Browse the repository at this point in the history
Free the response at the end of _nss_winbind_initgroups_dyn

Signed-off-by: Sushmita Bhattacharya <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
sushmbha authored and jrasamba committed Dec 9, 2022
1 parent 70e8da4 commit 67042d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nsswitch/winbind_nss_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@ _nss_winbind_initgroups_dyn(const char *user, gid_t group, long int *start,
/* Back to your regularly scheduled programming */

done:
winbindd_free_response(&response);
#ifdef DEBUG_NSS
fprintf(stderr, "[%5d]: initgroups %s returns %s (%d)\n", getpid(),
user, nss_err_str(ret), ret);
Expand Down

0 comments on commit 67042d9

Please sign in to comment.