search for: 7063f8c

Displaying 2 results from an estimated 2 matches for "7063f8c".

Did you mean: 076cf8c
2009 Mar 05
1
[PATCH 3/5] COM32: Improve opendir() to deal with no '/' at end of string
...a '/' to recognize that you're searching for a directory. This checks and automatically appends a '/' to the end of the pathname string (by creating another string temporarily) then making the COMBOOT call. diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c index aa2ba5b..7063f8c 100644 --- a/com32/lib/opendir.c +++ b/com32/lib/opendir.c @@ -16,10 +17,20 @@ DIR *opendir(const char *pathname) { DIR *newdir; com32sys_t regs; + char *tpath; + int pathlen; newdir = NULL; + pathlen = strlen(pathname); + if (pathname[pathlen-1] != '/') { + tpath = calloc(1, pathl...
2009 Mar 05
0
[PATCH 1/1] COM32/opendir: free for malloc
From: Gene Cumm <gene.cumm at gmail.com> COM32/opendir: free for malloc Signed-off-by: Gene Cumm <gene.cumm at gmail.com> --- Matching the malloc with a free. diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c index 7063f8c..5129273 100644 --- a/com32/lib/opendir.c +++ b/com32/lib/opendir.c @@ -50,6 +50,8 @@ DIR *opendir(const char *pathname) /* ENOTDIR is another but a file must exist */ errno = ENOENT; } + if (pathname != tpath) + free(tpath); /* W...