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

Changeset 99172baf in mainline


Ignore:
Timestamp:
2014-05-20T14:36:17Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
a293fef
Parents:
69d25e2
Message:

the error branch should terminate the function (also avoiding use after free of trans)
(detected by Coverity, CID 10449)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    r69d25e2 r99172baf  
    363363static void async_transaction_destroy(async_transaction_t *trans)
    364364{
    365         if (trans == NULL) {
    366                 return;
    367         }
    368         if (trans->buffer != NULL) {
     365        if (trans == NULL)
     366                return;
     367       
     368        if (trans->buffer != NULL)
    369369                free(trans->buffer);
    370         }
    371 
     370       
    372371        free(trans);
    373372}
     
    585584                async_answer_0(callid, ENOMEM);
    586585                async_transaction_destroy(trans);
     586                return;
    587587        }
    588588
Note: See TracChangeset for help on using the changeset viewer.