This could be done more efficiently with [`gst_buffer_new_wrapped`](http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#gst-buffer-new-wrapped):

    buf = gst_buffer_new_wrapped(cleartext_data, cleartext_size);