@@ -1093,9 +1093,10 @@ int dpll_nl_pin_id_get_doit(struct sk_buff *skb, struct genl_info *info)
1093
1093
return - ENOMEM ;
1094
1094
hdr = genlmsg_put_reply (msg , info , & dpll_nl_family , 0 ,
1095
1095
DPLL_CMD_PIN_ID_GET );
1096
- if (!hdr )
1096
+ if (!hdr ) {
1097
+ nlmsg_free (msg );
1097
1098
return - EMSGSIZE ;
1098
-
1099
+ }
1099
1100
pin = dpll_pin_find_from_nlattr (info );
1100
1101
if (!IS_ERR (pin )) {
1101
1102
ret = dpll_msg_add_pin_handle (msg , pin );
@@ -1123,8 +1124,10 @@ int dpll_nl_pin_get_doit(struct sk_buff *skb, struct genl_info *info)
1123
1124
return - ENOMEM ;
1124
1125
hdr = genlmsg_put_reply (msg , info , & dpll_nl_family , 0 ,
1125
1126
DPLL_CMD_PIN_GET );
1126
- if (!hdr )
1127
+ if (!hdr ) {
1128
+ nlmsg_free (msg );
1127
1129
return - EMSGSIZE ;
1130
+ }
1128
1131
ret = dpll_cmd_pin_get_one (msg , pin , info -> extack );
1129
1132
if (ret ) {
1130
1133
nlmsg_free (msg );
@@ -1256,8 +1259,10 @@ int dpll_nl_device_id_get_doit(struct sk_buff *skb, struct genl_info *info)
1256
1259
return - ENOMEM ;
1257
1260
hdr = genlmsg_put_reply (msg , info , & dpll_nl_family , 0 ,
1258
1261
DPLL_CMD_DEVICE_ID_GET );
1259
- if (!hdr )
1262
+ if (!hdr ) {
1263
+ nlmsg_free (msg );
1260
1264
return - EMSGSIZE ;
1265
+ }
1261
1266
1262
1267
dpll = dpll_device_find_from_nlattr (info );
1263
1268
if (!IS_ERR (dpll )) {
@@ -1284,8 +1289,10 @@ int dpll_nl_device_get_doit(struct sk_buff *skb, struct genl_info *info)
1284
1289
return - ENOMEM ;
1285
1290
hdr = genlmsg_put_reply (msg , info , & dpll_nl_family , 0 ,
1286
1291
DPLL_CMD_DEVICE_GET );
1287
- if (!hdr )
1292
+ if (!hdr ) {
1293
+ nlmsg_free (msg );
1288
1294
return - EMSGSIZE ;
1295
+ }
1289
1296
1290
1297
ret = dpll_device_get_one (dpll , msg , info -> extack );
1291
1298
if (ret ) {
0 commit comments