When using connection info arrays with a conninfo string in the dbname
slot, some memory would be leaked if an error occurred while
processing the following array slots.
found by Coverity
{
printfPQExpBuffer(errorMessage,
libpq_gettext("out of memory\n"));
+ PQconninfoFree(str_options);
return NULL;
}
memcpy(options, PQconninfoOptions, sizeof(PQconninfoOptions));
libpq_gettext("invalid connection option \"%s\"\n"),
pname);
PQconninfoFree(options);
+ PQconninfoFree(str_options);
return NULL;
}
printfPQExpBuffer(errorMessage,
libpq_gettext("out of memory\n"));
PQconninfoFree(options);
+ PQconninfoFree(str_options);
return NULL;
}
}