hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1076999 - /hadoop/common/branches/branch-0.20-security-patches/src/c++/task-controller/task-controller.c
Date Fri, 04 Mar 2011 03:29:13 GMT
Author: omalley
Date: Fri Mar  4 03:29:13 2011
New Revision: 1076999

URL: http://svn.apache.org/viewvc?rev=1076999&view=rev
Log:
commit c76bb66bf933e72b68bd477f661bad071a12f250
Author: Yahoo\! <ltucker@yahoo-inc.com>
Date:   Thu Sep 10 22:41:37 2009 -0700

    HADOOP:5420 Update the patch to fix a memory leak

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/c++/task-controller/task-controller.c

Modified: hadoop/common/branches/branch-0.20-security-patches/src/c++/task-controller/task-controller.c
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/c%2B%2B/task-controller/task-controller.c?rev=1076999&r1=1076998&r2=1076999&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/c++/task-controller/task-controller.c
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/c++/task-controller/task-controller.c
Fri Mar  4 03:29:13 2011
@@ -74,6 +74,7 @@ int change_user(const char * user) {
 // function to check if the passed tt_root is present in hadoop.tmp.dir
 int check_tt_root(const char *tt_root) {
   char ** mapred_local_dir;
+  char ** iter;
   int found = -1;
 
   if (tt_root == NULL) {
@@ -81,17 +82,18 @@ int check_tt_root(const char *tt_root) {
   }
 
   mapred_local_dir = (char **)get_values(TT_SYS_DIR_KEY);
+  iter = mapred_local_dir;
 
   if (mapred_local_dir == NULL) {
     return -1;
   }
 
-  while(*mapred_local_dir != NULL) {
-    if(strcmp(*mapred_local_dir,tt_root) == 0) {
+  while(*iter != NULL) {
+    if(strcmp(*iter, tt_root) == 0) {
       found = 0;
       break;
     }
-    ++mapred_local_dir; 
+    ++iter; 
   }
   free(mapred_local_dir);
   return found;



Mime
View raw message