If you malloc, you free.

This commit is contained in:
n-a-c-h
2005-01-09 23:23:38 +00:00
parent 38ce1610de
commit 2f6766d482

View File

@@ -479,6 +479,7 @@ void obtaindir()
}
cfgdir = (char *)malloc(strlen(homedir)+strlen("/.zsnes")+1);
strcpy(cfgdir, homedir);
free(homedir);
strcat(cfgdir, "/.zsnes");
tmp = opendir(cfgdir);
if (tmp == NULL) {