1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-25 08:45:46 +01:00

replaced free() with wfree() everywhere

fixed bug in wlist that caused colorpanel to crash
This commit is contained in:
kojima
1999-10-09 20:07:23 +00:00
parent 3ac51d8e32
commit 80fb09a74e
36 changed files with 272 additions and 234 deletions

View File

@@ -195,7 +195,7 @@ wfindfile(char *paths, char *file)
return NULL;
if (access(fullpath, F_OK)<0) {
free(fullpath);
wfree(fullpath);
return NULL;
} else {
return fullpath;
@@ -217,12 +217,12 @@ wfindfile(char *paths, char *file)
strcat(path, "/");
strcat(path, file);
fullpath = wexpandpath(path);
free(path);
wfree(path);
if (fullpath) {
if (access(fullpath, F_OK)==0) {
return fullpath;
}
free(fullpath);
wfree(fullpath);
}
tmp=&(tmp[len+1]);
if (*tmp==0) break;
@@ -249,7 +249,7 @@ wfindfileinlist(char **path_list, char *file)
return NULL;
if (access(fullpath, F_OK)<0) {
free(fullpath);
wfree(fullpath);
return NULL;
} else {
return fullpath;
@@ -269,13 +269,13 @@ wfindfileinlist(char **path_list, char *file)
strcat(path, file);
/* expand tilde */
fullpath = wexpandpath(path);
free(path);
wfree(path);
if (fullpath) {
/* check if file exists */
if (access(fullpath, F_OK)==0) {
return fullpath;
}
free(fullpath);
wfree(fullpath);
}
}
return NULL;
@@ -301,7 +301,7 @@ wfindfileinarray(proplist_t array, char *file)
return NULL;
if (access(fullpath, F_OK)<0) {
free(fullpath);
wfree(fullpath);
return NULL;
} else {
return fullpath;
@@ -329,13 +329,13 @@ wfindfileinarray(proplist_t array, char *file)
strcat(path, file);
/* expand tilde */
fullpath = wexpandpath(path);
free(path);
wfree(path);
if (fullpath) {
/* check if file exists */
if (access(fullpath, F_OK)==0) {
return fullpath;
}
free(fullpath);
wfree(fullpath);
}
}
return NULL;