udvm: free the buffer *before* throwing the exception

Freeing it after the exception doesn't do much, for obvious reasons. Also move
the allocation a bit later, and add modelines.

This fixes one major memory leak, although on inspection this code still isn't
safe since there are exception-throwing functions called all over the place with
glib memory active. Outside the scope of this fix though.

Bug: 10265
Change-Id: I1fe272e92b92cac6b99abb84866b8ae9b582e24c
Reviewed-on: https://code.wireshark.org/review/2931
Reviewed-by: Anders Broman <a.broman58@gmail.com>