From: Gary Lockyer Date: Wed, 21 May 2025 22:32:50 +0000 (+1200) Subject: nsswitch wbinfo: fix uninitialised return value on error X-Git-Tag: tevent-0.17.0~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02713eaeda18f416cf034f11ace268f9ff4f595c;p=thirdparty%2Fsamba.git nsswitch wbinfo: fix uninitialised return value on error In wbinfo_lookup_sids ret was not initialised and was not set in the error return paths. Returning an uninitialised value in the event of an error, and in all probability something that evaluated to true, so would not have signalled the error to the caller. Signed-off-by: Gary Lockyer Reviewed-by: Douglas Bagnall Reviewed-by: Anoop C S --- diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c index 93caa96f66c..1b3fb41b2d8 100644 --- a/nsswitch/wbinfo.c +++ b/nsswitch/wbinfo.c @@ -1519,7 +1519,7 @@ static bool wbinfo_lookup_sids(const char *arg) int i, num_sids; const char *p; wbcErr wbc_status; - bool ret; + bool ret = false; num_sids = 0; sids = NULL;