From: Gerhard Sittig Date: Fri, 9 Feb 2018 18:09:27 +0000 (+0100) Subject: lascar-el-usb: fix potential NULL dereference and memory leak X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=b65adcedb89f69c7f52a6e98e73a3513c2648e95;hp=b65adcedb89f69c7f52a6e98e73a3513c2648e95;p=libsigrok.git lascar-el-usb: fix potential NULL dereference and memory leak Check for successful allocation of multiple memory ranges, and release partial allocations in the error path when one of them failed. This fixes a potential memory leak, as well as avoids NULL dereferences. This was reported by clang's scan-build. ---