Fixed potential segmentation fault
This commit is contained in:
@ -1691,6 +1691,12 @@ mbus_sendrecv_request(mbus_handle *handle, int address, mbus_frame *reply, int m
|
|||||||
mbus_frame *frame, *next_frame;
|
mbus_frame *frame, *next_frame;
|
||||||
int frame_count = 0, result;
|
int frame_count = 0, result;
|
||||||
|
|
||||||
|
if (handle == NULL)
|
||||||
|
{
|
||||||
|
MBUS_ERROR("%s: Invalid M-Bus handle for request.\n", __PRETTY_FUNCTION__);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
frame = mbus_frame_new(MBUS_FRAME_TYPE_SHORT);
|
frame = mbus_frame_new(MBUS_FRAME_TYPE_SHORT);
|
||||||
|
|
||||||
if (frame == NULL)
|
if (frame == NULL)
|
||||||
|
Reference in New Issue
Block a user