mirror of
https://github.com/MariaDB/server.git
synced 2025-04-08 00:05:34 +02:00
MDEV-20379 Mroonga has memory leak in ha_mroonga::is_foreign_key_field
This commit is contained in:
parent
262927a9e5
commit
6dd1d6cb90
1 changed files with 3 additions and 0 deletions
|
@ -8994,10 +8994,12 @@ bool ha_mroonga::is_foreign_key_field(const char *table_name,
|
|||
|
||||
grn_obj *range = grn_ctx_at(ctx, grn_obj_get_range(ctx, column));
|
||||
if (!range) {
|
||||
grn_obj_unlink(ctx, column);
|
||||
DBUG_RETURN(false);
|
||||
}
|
||||
|
||||
if (!mrn::grn::is_table(range)) {
|
||||
grn_obj_unlink(ctx, column);
|
||||
DBUG_RETURN(false);
|
||||
}
|
||||
|
||||
|
@ -9011,6 +9013,7 @@ bool ha_mroonga::is_foreign_key_field(const char *table_name,
|
|||
DBUG_RETURN(true);
|
||||
}
|
||||
|
||||
grn_obj_unlink(ctx, column);
|
||||
DBUG_RETURN(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue