diff options
author | Jean-Baptiste Maillet <jean-baptiste.maillet@parrot.com> | 2014-11-24 10:47:26 +0100 |
---|---|---|
committer | Jean-Baptiste Maillet <jean-baptiste.maillet@parrot.com> | 2014-11-24 10:47:26 +0100 |
commit | 1a4bdbc2165a1a5d4136c53ff2a2b143029cdbdc (patch) | |
tree | 5a3a40421dad18ddb743dbfd4fd19319c1e74ac0 /examples/mrp_client | |
parent | aa0e114ee47e02d4f0ffde3e0ed5836a7423d0f6 (diff) | |
download | Open-AVB-1a4bdbc2165a1a5d4136c53ff2a2b143029cdbdc.tar.gz |
Fix for Coverity CID71769 - Dereference null return value
Diffstat (limited to 'examples/mrp_client')
-rwxr-xr-x | examples/mrp_client/mrpl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/mrp_client/mrpl.c b/examples/mrp_client/mrpl.c index acfca00d..5297be2d 100755 --- a/examples/mrp_client/mrpl.c +++ b/examples/mrp_client/mrpl.c @@ -146,6 +146,10 @@ int main(int argc, char *argv[]) } msgbuf = malloc(1500); + if (NULL == msgbuf) { + printf("malloc failed\n"); + return -1; + } memset(msgbuf, 0, 1500); sprintf(msgbuf, "S+D:C=6,P=3,V=0002"); @@ -164,5 +168,4 @@ int main(int argc, char *argv[]) rc = mprdclient_sendto(msgbuf, 1500); return (rc); - } |