diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index e9e6287e1d..ca5d10c983 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -146,10 +146,10 @@ typedef struct _GstBufferClass GstBufferClass; * @buf: a #GstBuffer. * * A pointer to a function that will be called on the buffer's malloc_data when - * this buffer is finalized. Defaults to g_free() if NULL. + * this buffer is finalized. Defaults to g_free(). * * Note that the free function only affects the buffer's malloc_data; if the - * buffer's malloc_data is NULL, the function will not be called. + * buffer's malloc_data is %NULL, the function will not be called. * * Since: 0.10.22 */ diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c index 7eb1ce0316..00452ef5f7 100644 --- a/gst/gstghostpad.c +++ b/gst/gstghostpad.c @@ -816,6 +816,8 @@ gst_ghost_pad_construct (GstGhostPad * gpad) internal = g_object_new (GST_TYPE_PROXY_PAD, "name", NULL, "direction", otherdir, "template", templ, NULL); + /* release ref obtained via g_object_get */ + gst_object_unref (templ); } else { internal = g_object_new (GST_TYPE_PROXY_PAD, "name", NULL,