commit | ba2a636306cb350754227da24f9b5af20bfeaf18 | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Wed Jul 26 12:16:09 2023 -0700 |
committer | Ed Tanous <ed@tanous.net> | Thu Jul 27 15:49:31 2023 +0000 |
tree | 4da80b8c3f6f23096791b68d5a9987066a7a9040 | |
parent | 4136ad77070741cd2a8a88647b9c42ef3942e6e8 [diff] [blame] |
Fix bad error handling GCC picked this up as a possible nullptr dereference. Change-Id: Ia570175666a109ebea0ef835b75a907507580cbe Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/nbd-proxy.c b/nbd-proxy.c index 83bada5..92dfb75 100644 --- a/nbd-proxy.c +++ b/nbd-proxy.c
@@ -450,7 +450,7 @@ int rc; ctx->udev = udev_new(); - if (!ctx) + if (!ctx->udev) { warn("can't create udev object"); return -1;