mirror of
https://github.com/BlackLight/Snort_AIPreproc.git
synced 2024-11-14 04:37:16 +01:00
Fixed a leak in postgresql.c
This commit is contained in:
parent
b2ac185671
commit
b40dca6b14
1 changed files with 8 additions and 0 deletions
|
@ -116,8 +116,16 @@ postgresql_fetch_row ( PSQL_result *res )
|
|||
void
|
||||
postgresql_free_result ( PSQL_result *res )
|
||||
{
|
||||
int i, j, ntuples;
|
||||
|
||||
if ( res )
|
||||
{
|
||||
ntuples = PQntuples ( res->res );
|
||||
|
||||
for ( i=0; i < ntuples; i++ )
|
||||
free ( res->rows[i] );
|
||||
free ( res->rows );
|
||||
|
||||
PQclear ( res->res );
|
||||
free ( res );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue