From cf16f9d120c8e2802927dd72d4de74b8ba42ff0a Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 3 Jun 2010 18:44:26 +0200 Subject: Fix potential NULL dereference in sss_groupshow Fixes: #510 --- src/tools/sss_groupshow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c index 084da21b9..213372031 100644 --- a/src/tools/sss_groupshow.c +++ b/src/tools/sss_groupshow.c @@ -595,11 +595,13 @@ static void group_show_trim_memberof_done(struct tevent_req *subreq) const char *, state->ndirect+2); if (!state->direct) { tevent_req_error(req, ENOMEM); + return; } state->direct[state->ndirect] = talloc_strdup(state->direct, name); if (!state->direct[state->ndirect]) { tevent_req_error(req, ENOMEM); + return; } state->direct[state->ndirect+1] = NULL; -- cgit