summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/misc.c b/src/misc.c
index 4fc616b..8983f1f 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -470,8 +470,8 @@ int register_extension()
LONG rresult;
HKEY newkey;
char *currentfilename = exe_name();
- char *iconname;
- char *opencommand;
+ char *iconname = NULL;
+ char *opencommand = NULL;
iconname = malloc(strlen(currentfilename)+6);
opencommand = malloc(strlen(currentfilename)+13);
sprintf(iconname, "%s,-102", currentfilename);
@@ -536,6 +536,10 @@ int register_extension()
}
RegCloseKey(newkey);
+ if(iconname) free(iconname);
+ if(opencommand) free(opencommand);
+ if(currentfilename) free(currentfilename);
+
return 1;
#elif defined(LIN32) || defined(LIN64)
char *currentfilename = exe_name();