1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fix memleak in cmd_export

This commit is contained in:
Michael Vetter 2022-02-24 12:02:13 +01:00
parent 6d17b36605
commit 62eedb1cd5

View File

@ -1101,6 +1101,7 @@ cmd_export(ProfWin* window, const char* const command, gchar** args)
char* path = get_expanded_path(args[0]); char* path = get_expanded_path(args[0]);
fd = open(path, O_WRONLY | O_CREAT, 00600); fd = open(path, O_WRONLY | O_CREAT, 00600);
free(path);
if (-1 == fd) { if (-1 == fd) {
cons_show("error: cannot open %s: %s", args[0], strerror(errno)); cons_show("error: cannot open %s: %s", args[0], strerror(errno));