diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-12-19 11:52:34 +0100 |
---|---|---|
committer | Jiri Pirko <jiri@resnulli.us> | 2014-12-19 11:52:34 +0100 |
commit | 8935dacac5cb5030b09532975542d3d42be3effb (patch) | |
tree | 451a7b5e6c3f297c4fac37bb22f825210b1d6508 | |
parent | fd311dc722c6fabc0eecac1a2e863355b75dec5d (diff) | |
download | libteam-8935dacac5cb5030b09532975542d3d42be3effb.tar.gz |
teamd: check retval of malloc in lw_tipc_link_state_change
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-rw-r--r-- | teamd/teamd_lw_tipc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/teamd/teamd_lw_tipc.c b/teamd/teamd_lw_tipc.c index 5f05b4a..6d7277d 100644 --- a/teamd/teamd_lw_tipc.c +++ b/teamd/teamd_lw_tipc.c @@ -102,6 +102,8 @@ check: } teamd_log_dbg("tipc: established new link <%s>", lnr->linkname); link = malloc(sizeof(struct tipc_link)); + if (!link) + return -ENOMEM; strcpy(link->name, lnr->linkname); link->up = link_up; link->peer = lnr->peer; |