qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing Null check


From: Mansour Ahmadi
Subject: Missing Null check
Date: Tue, 17 Mar 2020 16:40:09 -0400

Is a NULL check on 'drv1->format_name' missing here?
https://github.com/qemu/qemu/blob/cc818a2148c5f321bdeb8e5564bdb2914e824600/block.c#L400-L403

if (!strcmp(drv1->format_name, format_name)) {

While it is checked in similar case:
https://github.com/qemu/qemu/blob/cc818a2148c5f321bdeb8e5564bdb2914e824600/block.c#L797-L800

if (drv1->protocol_name && !strcmp(drv1->protocol_name, protocol)) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]