[Pkg-owncloud-commits] [owncloud-client] 34/103: Fix memory leak: Don't need to call strdup here

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Apr 30 18:08:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 7d3b0fe0c53b32e72a72fe3d32a172e3c51ad458
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Apr 18 19:16:10 2014 +0200

    Fix memory leak: Don't need to call strdup here
    
    The other_node outlive the trav structure, so we can just use the same pointer
---
 csync/src/csync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/csync/src/csync.c b/csync/src/csync.c
index 87b77e1..411826f 100644
--- a/csync/src/csync.c
+++ b/csync/src/csync.c
@@ -453,8 +453,8 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
 
       if( other_node ) {
           csync_file_stat_t *other_stat = (csync_file_stat_t*)other_node->data;
-          trav.other.etag = other_stat->etag ? c_strdup(other_stat->etag) : NULL;
-          trav.other.file_id = c_strdup(other_stat->file_id);
+          trav.other.etag = other_stat->etag;
+          trav.other.file_id = other_stat->file_id;
           trav.other.instruction = other_stat->instruction;
           trav.other.modtime = other_stat->modtime;
           trav.other.size = other_stat->size;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list