Changeset ccfe9c3 in mainline for uspace/lib/c/generic/bd_srv.c


Ignore:
Timestamp:
2014-09-23T14:23:02Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e69e0e
Parents:
58f26cb
Message:

Add missing free() in error path (Coccinelle)

The problem was found using Coccinelle [1] with the slightly
modified version of kfree3/kmalloc.cocci [2].

[1] http://coccinelle.lip6.fr/
[2] https://github.com/coccinelle/coccinellery

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/bd_srv.c

    r58f26cb rccfe9c3  
    7070                async_answer_0(rcallid, ENOTSUP);
    7171                async_answer_0(callid, ENOTSUP);
     72                free(buf);
    7273                return;
    7374        }
     
    7778                async_answer_0(rcallid, ENOMEM);
    7879                async_answer_0(callid, ENOMEM);
     80                free(buf);
    7981                return;
    8082        }
     
    112114                async_answer_0(rcallid, ENOTSUP);
    113115                async_answer_0(callid, ENOTSUP);
     116                free(buf);
    114117                return;
    115118        }
     
    119122                async_answer_0(rcallid, ENOMEM);
    120123                async_answer_0(callid, ENOMEM);
     124                free(buf);
    121125                return;
    122126        }
Note: See TracChangeset for help on using the changeset viewer.