Changes in / [4cdcd2b:3c9646b] in mainline


Ignore:
Location:
uspace/srv/devman
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/devman.c

    r4cdcd2b r3c9646b  
    728728        assert(drv != NULL);
    729729
    730         free(drv->name);
    731         free(drv->binary_path);
     730        free_not_null(drv->name);
     731        free_not_null(drv->binary_path);
    732732
    733733        clean_match_ids(&drv->match_ids);
     
    11791179       
    11801180        clean_match_ids(&fun->match_ids);
    1181         free(fun->name);
    1182         free(fun->pathname);
     1181        free_not_null(fun->name);
     1182        free_not_null(fun->pathname);
    11831183        free(fun);
    11841184}
  • uspace/srv/devman/util.c

    r4cdcd2b r3c9646b  
    8585}
    8686
     87void free_not_null(const void *ptr)
     88{
     89        if (ptr != NULL)
     90                free(ptr);
     91}
     92
    8793void replace_char(char *str, char orig, char repl)
    8894{
Note: See TracChangeset for help on using the changeset viewer.