There are several code paths which skip this declaration and initialization, notably on lines lines 182, 193, 201, 213, 218, which goto end on error conditions. If the initialization of ppValue was skipped by the goto, ldap_value_free may be called on an uninitialized variable and hence a wild free.
I am not a C++ expert, but I would suggest an additional look at this free: https://github.com/trustedsec/CS-Situational-Awareness-BOF/blob/b6de70e08884c7597898b478fd488a38c118d1e7/src/SA/ldapsearch/entry.c#L319
All the other variables being freed are declared and initialized at function entry. However, ppValue is not declared or initialized until line 228: https://github.com/trustedsec/CS-Situational-Awareness-BOF/blob/b6de70e08884c7597898b478fd488a38c118d1e7/src/SA/ldapsearch/entry.c#L228
There are several code paths which skip this declaration and initialization, notably on lines lines
182
,193
,201
,213
,218
, whichgoto end
on error conditions. If the initialization ofppValue
was skipped by thegoto
,ldap_value_free
may be called on an uninitialized variable and hence a wild free.