projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ebd6d6
)
SHOW: Fix memory leak on error path.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 14 Apr 2024 16:51:58 +0000
(09:51 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 14 Apr 2024 16:51:58 +0000
(09:51 -0700)
src/language/commands/set.c
patch
|
blob
|
history
diff --git
a/src/language/commands/set.c
b/src/language/commands/set.c
index bca5521f4ddc7a383033e5501013a4796c7a1a3a..a2d8fa6ad24f761bc96dbf15c2fd58a9c1d240e7 100644
(file)
--- a/
src/language/commands/set.c
+++ b/
src/language/commands/set.c
@@
-1491,14
+1491,14
@@
cmd_show (struct lexer *lexer, struct dataset *ds)
}
}
lex_error (lexer, _("Syntax error expecting the name of a setting."));
-
return CMD_FAILURE
;
+
goto error
;
found: ;
}
else
{
lex_error (lexer, _("Syntax error expecting the name of a setting."));
-
return CMD_FAILURE
;
+
goto error
;
}
lex_match (lexer, T_SLASH);
@@
-1509,6
+1509,10
@@
cmd_show (struct lexer *lexer, struct dataset *ds)
pivot_table_submit (pt);
return CMD_SUCCESS;
+
+error:
+ pivot_table_unref (pt);
+ return CMD_FAILURE;
}
\f
#define MAX_SAVED_SETTINGS 5