]> git.ipfire.org Git - thirdparty/systemd.git/commit
scsi_id: use _cleanup_free_ on buffer allocated by get_file_options
authorFilipe Brandenburger <filbranden@google.com>
Thu, 7 Jun 2018 21:32:07 +0000 (14:32 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 8 Jun 2018 13:15:02 +0000 (15:15 +0200)
commit3ad97058247a3f7f274a515d279e9b8428de002e
treec7351f71e8d51bfca730c8d4904d2dd458cff782
parent6cdf635de0741c5b7921afc3d126f8bd3b5aca2d
scsi_id: use _cleanup_free_ on buffer allocated by get_file_options

This simplifies the code a bit and hopefully fixes Coverity finding
CID 1382966. There was not actually a resource leak here (Coverity
seemed to be confused by thinking log_oom() could actually return 0),
but the fix doesn't hurt and should make this code more resilient to
future refactorings.

Tested: builds fine, manually called scsi_id, seems to work ok.
src/udev/scsi_id/scsi_id.c