projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dfef13
)
fixed minor memory leak when running out of memory
author
Daniel Stenberg
<daniel@haxx.se>
Fri, 17 Dec 2004 09:00:19 +0000
(09:00 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Fri, 17 Dec 2004 09:00:19 +0000
(09:00 +0000)
lib/ftp.c
patch
|
blob
|
history
diff --git
a/lib/ftp.c
b/lib/ftp.c
index
65dfa83
..
5016a6a
100644
(file)
--- a/
lib/ftp.c
+++ b/
lib/ftp.c
@@
-779,8
+779,10
@@
CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status)
dlen = strlen(path)-flen;
if(dlen) {
ftp->prevpath = malloc(dlen + 1);
- if(!ftp->prevpath)
+ if(!ftp->prevpath) {
+ free(path);
return CURLE_OUT_OF_MEMORY;
+ }
memcpy(ftp->prevpath, path, dlen);
ftp->prevpath[dlen]=0; /* terminate */
infof(data, "Remembering we are in dir %s\n", ftp->prevpath);