summaryrefslogtreecommitdiffstats
path: root/src/askloc.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:01:11 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:01:11 +0100
commit407520464f0ef225a17e4ec025ba2503df231e5b (patch)
treecb4097c61ab94d63fd364924bac861e474d9f0f0 /src/askloc.c
parentba0f998648ec890d51febb4e51ad09737f5e38c6 (diff)
src/askloc.c: Fix memory leak in error path reported by Coverity scan
Diffstat (limited to 'src/askloc.c')
-rw-r--r--src/askloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/askloc.c b/src/askloc.c
index 43b4880..49e30fe 100644
--- a/src/askloc.c
+++ b/src/askloc.c
@@ -210,7 +210,14 @@ char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
dir=opendir(dst_directory);
}
if(dir==NULL)
+ {
+ delwin(window);
+ (void) clearok(stdscr, TRUE);
+#ifdef HAVE_TOUCHWIN
+ touchwin(stdscr);
+#endif
return NULL;
+ }
{
file_info_t *file_info;
file_info=(file_info_t*)MALLOC(sizeof(*file_info));