X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Futilities.c;h=c866dd54038f00960107b789786e4cdff4dbbe3a;hb=875200dc0c5668bba4f8a68b487f9d2f2a1eedb0;hp=ce6cd925bdc76d566ca15d4a5243d71102e32a47;hpb=ca065f55235fd9979ede818963780f417d70c64e;p=awesomized%2Flibmemcached diff --git a/src/utilities.c b/src/utilities.c index ce6cd925..c866dd54 100644 --- a/src/utilities.c +++ b/src/utilities.c @@ -1,8 +1,5 @@ #include -static char **cleanup_list= NULL; -static char cleanup_list_length= 0; - void parse_opt_servers(memcached_st *memc, char *server_strings) { @@ -53,25 +50,3 @@ void parse_opt_servers(memcached_st *memc, } } } - -void cleanup(void) -{ - unsigned int x; - for (x= 0; x < cleanup_list_length; x++) - free(cleanup_list[x]); - - free(cleanup_list); -} - -char *strdup_cleanup(const char *str) -{ - char *ptr; - - ptr= strdup(str); - - cleanup_list= (char **)realloc(cleanup_list, sizeof(char *) * (cleanup_list_length+1)); - cleanup_list[cleanup_list_length]= ptr; - cleanup_list_length++; - - return ptr; -}