Skip to content

Commit 77bdf5a

Browse files
committed
Fixed double close (introduced in PR275)
1 parent e240810 commit 77bdf5a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

unittest/libmariadb/misc.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -287,37 +287,28 @@ static int test_frm_bug(MYSQL *mysql)
287287
}
288288

289289
rc= mysql_query(mysql, "SHOW TABLE STATUS like 'test_frm_bug'");
290-
if (rc)
291-
fclose(test_file);
290+
291+
fclose(test_file);
292292
check_mysql_rc(rc, mysql);
293293

294294
result= mysql_store_result(mysql);
295-
if(!result)
296-
fclose(test_file);
297295
FAIL_IF(!result, "Invalid result set");/* It can't be NULL */
298296

299297
rc= 0;
300298
while (mysql_fetch_row(result))
301299
rc++;
302-
if(rc != 1)
303-
fclose(test_file);
304300
FAIL_UNLESS(rc == 1, "rowcount != 1");
305301

306302
mysql_data_seek(result, 0);
307303

308304
row= mysql_fetch_row(result);
309-
if(!row)
310-
fclose(test_file);
311305
FAIL_IF(!row, "couldn't fetch row");
312306

313-
if(row[17] != 0)
314-
fclose(test_file);
315307
FAIL_UNLESS(row[17] != 0, "row[17] != 0");
316308

317309
mysql_free_result(result);
318310
mysql_stmt_close(stmt);
319311

320-
fclose(test_file);
321312
mysql_query(mysql, "drop table if exists test_frm_bug");
322313
unlink(test_frm);
323314
return OK;

0 commit comments

Comments
 (0)