Ignore:
Timestamp:
Jun 29, 2009, 7:19:14 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3144@localhost: bruno | 2009-06-26 12:18:08 +0200

  • Remove mr_string.c|.h useless and in de=uplication with mr_str.c|.h
  • Solve with valgrind's help some memroy leak (harmless mostly)
  • Solve a seg fault at end, when unallocating a bkpinfo member after the strcuture disallocation !
  • after mr_strtok, memory ssociated with the token needs to be free
  • Adds a new function free_newt_stuff to free newt related allocated memory
  • Do not exit if mr_free is unsuccessful, and only warn when debug > 8
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-raid.c

    r2211 r2241  
    1717#include "lib-common-externs.h"
    1818#include "libmondo-raid.h"
    19 #include "mr_string.h"
    2019#include "mr_mem.h"
     20#include "mr_str.h"
    2121
    2222#ifdef __FreeBSD__
     
    10371037    strcpy(raidlist->el[raidlist->entries].raid_device, strtmp);
    10381038    paranoid_free(strtmp);
    1039     paranoid_free(token);
     1039    mr_free(token);
    10401040    // skip ':' and status
    10411041    token = mr_strtok (string, delims, &lastpos);
    1042     paranoid_free(token);
     1042    mr_free(token);
    10431043    token = mr_strtok (string, delims, &lastpos);
    10441044    if (!strcmp(token, "inactive")) {
     
    10461046         raidlist->el[raidlist->entries].raid_device);
    10471047      paranoid_free(string);
    1048       paranoid_free(token);
     1048      mr_free(token);
    10491049      return 1;
    10501050    }
    1051     paranoid_free(token);
     1051    mr_free(token);
    10521052
    10531053    // get RAID level
     
    10751075      return 1;
    10761076    }
    1077     paranoid_free(token);
     1077    mr_free(token);
    10781078
    10791079    // get RAID devices (type, index, device)
     
    11201120        break;
    11211121      }
    1122       paranoid_free(token);
     1122      mr_free(token);
    11231123    }
    11241124
Note: See TracChangeset for help on using the changeset viewer.