diff options
author | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2016-02-14 18:33:20 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2016-02-14 18:33:20 +0200 |
commit | 2a4781789612c6c53cbe12c1426f93b15737a148 (patch) | |
tree | 7df7ccbf97cd5ce809b3dd9dc7142ae7f6a66c32 /client | |
parent | b7dc830274d78cc191d7d29bcdd988dd10cd8c49 (diff) | |
download | mariadb-git-2a4781789612c6c53cbe12c1426f93b15737a148.tar.gz |
MDEV-9225 mysql_upgrade segfault due to missing /etc/my.cnf.d
In case of missing includedir file, we would attempt to free a NULL
pointer. Make sure to guard against that.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql_upgrade.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index bc9b3c5b149..8cfdac5b69a 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -182,7 +182,8 @@ static const char *load_default_groups[]= static void free_used_memory(void) { /* Free memory allocated by 'load_defaults' */ - free_defaults(defaults_argv); + if (defaults_argv) + free_defaults(defaults_argv); dynstr_free(&ds_args); dynstr_free(&conn_args); |