segfault fix from Dave Weston <dtweston@student.math.uwaterloo.ca>

SVN revision: 6069
This commit is contained in:
Corey Donohoe 2002-03-17 02:32:53 +00:00
parent acdc25b8d6
commit ad51a5ee68
1 changed files with 2 additions and 3 deletions

View File

@ -629,12 +629,12 @@ __imlib_ProduceLoader(char *file)
char ** char **
__imlib_ListLoaders(int *num_ret) __imlib_ListLoaders(int *num_ret)
{ {
char **list = NULL, **l, *s, *home; char **list = NULL, **l, *s;
int num, i, pi = 0; int num, i, pi = 0;
*num_ret = 0; *num_ret = 0;
/* same for system loader path */ /* same for system loader path */
s = (char *) realloc(s, sizeof(SYS_LOADERS_PATH) + 6 + 1); s = (char *) malloc(sizeof(SYS_LOADERS_PATH) + 6 + 1);
sprintf(s, SYS_LOADERS_PATH "/image"); sprintf(s, SYS_LOADERS_PATH "/image");
#ifndef __EMX__ #ifndef __EMX__
l = __imlib_FileDir(s, &num); l = __imlib_FileDir(s, &num);
@ -658,7 +658,6 @@ __imlib_ListLoaders(int *num_ret)
} }
__imlib_FileFreeDirList(l, num); __imlib_FileFreeDirList(l, num);
} }
free(home);
free(s); free(s);
/* List currently contains *everything in there* we need to weed out /* List currently contains *everything in there* we need to weed out