mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix NULL pointer check for *buf
As ternary operator has lower priority then add operation, this check was not doing what seemed to be expected. So enclose the test in braces and check for NULL in *buf.
This commit is contained in:
parent
22bb69eb99
commit
bebfa29b48
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.79 -
|
Version 2.02.79 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix NULL pointer check in error path in clvmd do_command(). (2.02.78)
|
||||||
Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51)
|
Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51)
|
||||||
Create /var/run/lvm directory during clvmd initialisation if missing.
|
Create /var/run/lvm directory during clvmd initialisation if missing.
|
||||||
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
|
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
|
||||||
|
@ -168,8 +168,8 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen,
|
|||||||
|
|
||||||
/* Check the status of the command and return the error text */
|
/* Check the status of the command and return the error text */
|
||||||
if (status) {
|
if (status) {
|
||||||
*retlen = 1 + (*buf) ? dm_snprintf(*buf, buflen, "%s",
|
*retlen = 1 + ((*buf) ? dm_snprintf(*buf, buflen, "%s",
|
||||||
strerror(status)) : -1;
|
strerror(status)) : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
Reference in New Issue
Block a user