[PATCH v4 2/5] winegstreamer: Move the conditional cleanup to the create error path.
Zebediah Figura (she/her)
zfigura at codeweavers.com
Tue Feb 22 12:05:58 CST 2022
On 2/22/22 12:03, Rémi Bernon wrote:
> On 2/22/22 18:43, Zebediah Figura wrote:
>> +out_free_sink_caps:
>> + gst_caps_unref(sink_caps);
>> +out_free_src_pad:
>> + gst_object_unref(transform->my_src);
>> +out_free_src_caps:
>> + gst_caps_unref(src_caps);
>> +out_free_transform:
>> + free(transform);
>> + GST_ERROR("Failed to create winegstreamer transform.");
>> return status;
>> }
>
> I hesitated with an approach like this. I haven't seen goto dipatch like
> this elsewhere so I thought it wasn't the preferred style.
I haven't seen it used elsewhere in Wine, but it was adopted in a couple
of places in vkd3d, and I personally like it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220222/a1a49c03/attachment.sig>
More information about the wine-devel
mailing list