Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset ccfe9c3 in mainline


Ignore:
Timestamp:
2014-09-23T14:23:02Z (7 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
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

Location:
uspace/lib/c/generic
Files:
2 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        }
  • uspace/lib/c/generic/io/con_srv.c

    r58f26cb rccfe9c3  
    8989                async_answer_0(rcallid, ENOTSUP);
    9090                async_answer_0(callid, ENOTSUP);
     91                free(buf);
    9192                return;
    9293        }
     
    9697                async_answer_0(rcallid, rc);
    9798                async_answer_0(callid, rc);
     99                free(buf);
    98100                return;
    99101        }
Note: See TracChangeset for help on using the changeset viewer.