break;
}
- if (name == NULL || template == NULL || caps == NULL)
- return NULL;
+ if (name == NULL || template == NULL || caps == NULL) {
+ if (name)
+ g_free (name);
+ if (caps)
+ gst_caps_unref (caps);
+ return FALSE;
+ }
stream = g_new0 (GstFluPSStream, 1);
stream->id = id;
default:
break;
}
- if (name == NULL || template == NULL || caps == NULL)
+ if (name == NULL || template == NULL || caps == NULL) {
+ if (name)
+ g_free (name);
+ if (caps)
+ gst_caps_unref (caps);
return FALSE;
+ }
stream->stream_type = stream_type;
stream->id = id;