shared_shaper_id = (uint32_t *)malloc(MAX_NUM_SHARED_SHAPERS *
sizeof(uint32_t));
+ if (shared_shaper_id == NULL) {
+ printf(" Memory not allocated for shared shapers (error)\n");
+ return;
+ }
+
/* Parse multi shared shaper id string */
ret = parse_multi_ss_id_str(s_str, &n_shared_shapers, shared_shaper_id);
if (ret) {
shared_shaper_id = (uint32_t *)malloc(MAX_NUM_SHARED_SHAPERS *
sizeof(uint32_t));
+ if (shared_shaper_id == NULL) {
+ printf(" Memory not allocated for shared shapers (error)\n");
+ return;
+ }
+
/* Parse multi shared shaper id string */
ret = parse_multi_ss_id_str(s_str, &n_shared_shapers, shared_shaper_id);
if (ret) {