summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fbb4a83)
Need to check calloc result. In case of failure the bridge member will be missing.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
struct bridge_member *bm;
bm = calloc(1, sizeof(*bm) + strlen(dev->ifname) + 1);
struct bridge_member *bm;
bm = calloc(1, sizeof(*bm) + strlen(dev->ifname) + 1);
+ if (!bm)
+ return NULL;
+
bm->bst = bst;
bm->dev.cb = bridge_member_cb;
bm->dev.hotplug = hotplug;
bm->bst = bst;
bm->dev.cb = bridge_member_cb;
bm->dev.hotplug = hotplug;