HDB sqlite backend: fix error NULL deref
This commit is contained in:
@@ -449,12 +449,12 @@ hdb_sqlite_make_database(krb5_context context, HDB *db, const char *filename)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
free(hsdb->db_file);
|
|
||||||
hsdb->db_file = NULL;
|
|
||||||
if (hsdb->db)
|
if (hsdb->db)
|
||||||
sqlite3_close(hsdb->db);
|
sqlite3_close(hsdb->db);
|
||||||
if (created_file)
|
if (created_file)
|
||||||
unlink(hsdb->db_file);
|
unlink(hsdb->db_file);
|
||||||
|
free(hsdb->db_file);
|
||||||
|
hsdb->db_file = NULL;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user