Changeset 10ef47ba in mainline


Ignore:
Timestamp:
2014-05-20T14:24:16Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69d25e2
Parents:
bf9cb2f
Message:

avoid double free of prefix
(detected by Coverity, CID 10457)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/compl.c

    rbf9cb2f r10ef47ba  
    209209                *cstart += rpath_sep + 1 - prefix;
    210210                free(prefix);
     211                prefix = NULL;
    211212
    212213                cs->path_list = malloc(sizeof(char *) * 2);
     
    252253        }
    253254
    254         if (cs != NULL && cs->prefix != NULL)
     255        if ((cs != NULL) && (cs->prefix != NULL))
    255256                free(cs->prefix);
     257       
    256258        if (dirname != NULL)
    257259                free(dirname);
     260       
    258261        if (prefix != NULL)
    259262                free(prefix);
     263       
    260264        if (stext != NULL)
    261265                free(stext);
     266       
    262267        if (cs != NULL)
    263268                free(cs);
     269       
    264270        if (tokens != NULL)
    265271                free(tokens);
Note: See TracChangeset for help on using the changeset viewer.