Skip to content

Commit 5d17415

Browse files
committed
python: remove redundant null check
free can handle null pointers. Signed-off-by: Daniel Wagner <[email protected]>
1 parent a616ace commit 5d17415

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libnvme/libnvme/nvme.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ PyObject *read_hostid();
110110
};
111111

112112
%typemap(newfree) struct nvmf_discovery_log * {
113-
if ($1) free($1);
113+
free($1);
114114
}
115115

116116
%typemap(out) struct nvmf_discovery_log * {

0 commit comments

Comments
 (0)