Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 591299 Details for
Bug 831419
Plug a memleak with no cache
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
memleak with no cache
curlftpfs-0.9.2-nocache_memleak.patch (text/plain), 1.85 KB, created by
Jérôme Benoit
on 2012-06-12 23:37:28 UTC
(
hide
)
Description:
memleak with no cache
Filename:
MIME Type:
Creator:
Jérôme Benoit
Created:
2012-06-12 23:37:28 UTC
Size:
1.85 KB
patch
obsolete
>Subject: Fix a memory leak when cache is disabled. >--- > cache.c | 2 1 + 1 - 0 ! > ftpfs-ls.c | 19 15 + 4 - 0 ! > 2 files changed, 16 insertions(+), 5 deletions(-) > >Index: b/cache.c >=================================================================== >--- a/cache.c >+++ b/cache.c >@@ -25,7 +25,7 @@ struct cache { > time_t last_cleaned; > }; > >-static struct cache cache; >+struct cache cache; > > struct node { > struct stat stat; >Index: b/ftpfs-ls.c >=================================================================== >--- a/ftpfs-ls.c >+++ b/ftpfs-ls.c >@@ -25,6 +25,13 @@ > #include "charset_utils.h" > #include "ftpfs-ls.h" > >+struct cache { >+ int on; >+ char incomplete[]; >+}; >+ >+extern struct cache cache; >+ > static int parse_dir_unix(const char *line, > struct stat *sbuf, > char *file, >@@ -243,8 +250,10 @@ int parse_dir(const char* list, const ch > reallink = g_strdup(link); > } > int linksize = strlen(reallink); >- cache_add_link(full_path, reallink, linksize+1); >- DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink); >+ if (cache.on) { >+ cache_add_link(full_path, reallink, linksize+1); >+ DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink); >+ } > if (linkbuf && linklen) { > if (linksize > linklen) linksize = linklen - 1; > strncpy(linkbuf, reallink, linksize); >@@ -257,8 +266,10 @@ int parse_dir(const char* list, const ch > DEBUG(1, "filler: %s\n", file); > filler(h, file, &stat_buf); > } else { >- DEBUG(1, "cache_add_attr: %s\n", full_path); >- cache_add_attr(full_path, &stat_buf); >+ if (cache.on) { >+ DEBUG(1, "cache_add_attr: %s\n", full_path); >+ cache_add_attr(full_path, &stat_buf); >+ } > } > > DEBUG(2, "comparing %s %s\n", name, file);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 831419
: 591299