aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Markus <tobbi@mozilla-uk.org>2015-01-21 21:19:32 +0100
committerTobias Markus <tobbi@mozilla-uk.org>2015-01-21 21:19:32 +0100
commit3361d8f95850001ded21ac3e9474d9422ac0fd96 (patch)
tree783fe6fbfc349a190bc771ed8c341f579294b923 /lib
parent7dba29719ce5085af41dea669019ba214f03b460 (diff)
Fix for coverity #1194431
Diffstat (limited to 'lib')
-rw-r--r--lib/timidity/timidity/timidity.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/timidity/timidity/timidity.c b/lib/timidity/timidity/timidity.c
index 958296a464..e5383138f2 100644
--- a/lib/timidity/timidity/timidity.c
+++ b/lib/timidity/timidity/timidity.c
@@ -974,8 +974,14 @@ static int set_gus_patchconf(char *name, int line,
{
int err;
if((err = set_gus_patchconf_opts(name, line, opts[j], tone)) != 0)
+ {
+#ifdef SET_GUS_PATCHCONF_COMMENT
+ if(old_name != NULL)
+ free(old_name);
+#endif
return err;
}
+ }
#ifdef SET_GUS_PATCHCONF_COMMENT
if(tone->comment == NULL ||
(old_name != NULL && strcmp(old_name,tone->comment) == 0))