hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r880631 - in /hadoop/mapreduce/branches/branch-0.21: CHANGES.txt src/c++/libhdfs/hdfs.c
Date Mon, 16 Nov 2009 06:55:23 GMT
Author: dhruba
Date: Mon Nov 16 06:55:21 2009
New Revision: 880631

URL: http://svn.apache.org/viewvc?rev=880631&view=rev
Log:
HDFS-596. Fix memory leak in hdfsFreeFileInfo() for libhdfs.
(Zhang Bingjun via dhruba)


Modified:
    hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
    hadoop/mapreduce/branches/branch-0.21/src/c++/libhdfs/hdfs.c

Modified: hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/CHANGES.txt?rev=880631&r1=880630&r2=880631&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/branch-0.21/CHANGES.txt Mon Nov 16 06:55:21 2009
@@ -815,3 +815,6 @@
 
     MAPREDUCE-1068. Fix streaming job to show proper message if file is 
     is not present. (Amareshwari Sriramadasu via sharad)
+
+    HDFS-596. Fix memory leak in hdfsFreeFileInfo() for libhdfs.
+    (Zhang Bingjun via dhruba)

Modified: hadoop/mapreduce/branches/branch-0.21/src/c++/libhdfs/hdfs.c
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/c%2B%2B/libhdfs/hdfs.c?rev=880631&r1=880630&r2=880631&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/c++/libhdfs/hdfs.c (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/c++/libhdfs/hdfs.c Mon Nov 16 06:55:21 2009
@@ -2260,12 +2260,18 @@
 
 void hdfsFreeFileInfo(hdfsFileInfo *hdfsFileInfo, int numEntries)
 {
-    //Free the mName
+    //Free the mName, mOwner, and mGroup
     int i;
     for (i=0; i < numEntries; ++i) {
         if (hdfsFileInfo[i].mName) {
             free(hdfsFileInfo[i].mName);
         }
+        if (hdfsFileInfo[i].mOwner) {
+            free(hdfsFileInfo[i].mOwner);
+        }
+        if (hdfsFileInfo[i].mGroup) {
+            free(hdfsFileInfo[i].mGroup);
+        }
     }
 
     //Free entire block



Mime
View raw message