summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-06 17:49:47 +0100
committerHaru <haru@dotalux.com>2016-02-06 17:49:47 +0100
commitdfdf6b91839c88d9ca1071d63337d33757a87f4c (patch)
treec161a1ff05f1d166a94a83319a38368899df5234 /src/common
parent53bc4e55704e8cce9a055d7f9947786a0c7f8344 (diff)
parent6010ddb43d35d61864f7d139287f5ba18146c6bf (diff)
downloadhercules-dfdf6b91839c88d9ca1071d63337d33757a87f4c.tar.gz
hercules-dfdf6b91839c88d9ca1071d63337d33757a87f4c.tar.bz2
hercules-dfdf6b91839c88d9ca1071d63337d33757a87f4c.tar.xz
hercules-dfdf6b91839c88d9ca1071d63337d33757a87f4c.zip
Merge pull request #1142 from 4144/pluginsfix
Fix memory corruption if plugin add command line parameter without he…
Diffstat (limited to 'src/common')
-rw-r--r--src/common/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 201d4f5e8..ccd80c44b 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -230,7 +230,10 @@ bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, Cm
data->name = aStrdup(name);
data->shortname = shortname;
data->func = func;
- data->help = aStrdup(help);
+ if (help)
+ data->help = aStrdup(help);
+ else
+ data->help = NULL;
data->options = options;
return true;