summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi2k13 <3476227+Kenpachi2k13@users.noreply.github.com>2020-05-03 08:34:18 +0200
committerGitHub <noreply@github.com>2020-05-03 08:34:18 +0200
commit967c5f6ccd2dadcaff54041f4cd7c9a0cd3fb9e5 (patch)
tree21f0a0d6543ee8aa86e035fc696965ca42555622
parentec43ccf2d3d992386b2ba9d7812bcbd24639b063 (diff)
downloadhercules-967c5f6ccd2dadcaff54041f4cd7c9a0cd3fb9e5.tar.gz
hercules-967c5f6ccd2dadcaff54041f4cd7c9a0cd3fb9e5.tar.bz2
hercules-967c5f6ccd2dadcaff54041f4cd7c9a0cd3fb9e5.tar.xz
hercules-967c5f6ccd2dadcaff54041f4cd7c9a0cd3fb9e5.zip
Free dummy_sd in all code paths
-rw-r--r--src/map/script.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 68c3f2fbc..0b6f0f71c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -15453,6 +15453,8 @@ static BUILDIN(atcommand)
if (!atcommand->exec(fd, sd, cmd, false)) {
ShowWarning("script: buildin_atcommand: failed to execute command '%s'\n", cmd);
+ if (dummy_sd != NULL)
+ aFree(dummy_sd);
return false;
}
if (dummy_sd) aFree(dummy_sd);