If function "wbcAddNamedBlob" premature copying of the pointer "*pblobs = blobs" The pointer is copied 2 times, the first copy is probably a typo. https://gitlab.com/samba-team/samba/-/blob/master/nsswitch/libwbclient/wbc_util.c#L894 https://gitlab.com/samba-team/samba/-/blob/master/nsswitch/libwbclient/wbc_util.c#L908
if beetween "*pblobs = blobs" and "*pblobs = blobs" if there is a transition to the "bone" label, then the calling function will make a double release
(In reply to prohorp from comment #1) not "bone" but "done". Misspell
and move "wbcFreeMemory(old)" https://gitlab.com/samba-team/samba/-/blob/master/nsswitch/libwbclient/wbc_util.c#L892 --- wbcFreeMemory(old); to end function https://gitlab.com/samba-team/samba/-/blob/master/nsswitch/libwbclient/wbc_util.c#L908 : *num_blobs += 1; +++ if (*pblobs != NULL) wbcFreeMemory(*pblobs); *pblobs = blobs; blobs = NULL;