move the mysql_free_result, looks like we can't free it until we free the row
This commit is contained in:
parent
3e683e3002
commit
d2870f0692
|
@ -100,12 +100,13 @@ MYSQL_ROW zmDbFetchOne( const char *query ) {
|
|||
int n_rows = mysql_num_rows( result );
|
||||
if ( n_rows != 1 ) {
|
||||
Error( "Bogus number of lines return from query, %d returned for query %s.", n_rows, query );
|
||||
mysql_free_result( result );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MYSQL_ROW dbrow = mysql_fetch_row( result );
|
||||
mysql_free_result( result );
|
||||
if ( ! dbrow ) {
|
||||
mysql_free_result( result );
|
||||
Error("Error getting row from query %s. Error is %s", query, mysql_error( &dbconn ) );
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue