|
Description
|
In smb_load_proto_properties(), we have the following bit of code:
prop = sa_create_property(
smb_proto_options[index].name, value != NULL ? value : "");
if (value != NULL)
free(value);
if (prop != NULL)
(void) (protoset, prop);
The problem is that sa_add_protocol_property() can fail, but we're
just casting away the return value here (and everywhere else). This
should free up 'prop' on failure.
I also don't understand the error propagation in these functions. The functions
return success/failure, but if either sa_create_property() or
sa_add_protocol_property() fail, we unconditionally return SA_OK.
|