client: fix a strdup memory leak
client: fix a strdup memory leak

Memory leak found by valgrinding simple-shm client.
struct wl_global::interface is a strdup()'d string that was never freed.

Make a function for freeing a wl_global, and use it.

krh: Edit to name wl_global destructor wl_global_destroy.

Signed-off-by: Pekka Paalanen <6c0263d81461c956d504307112a4ce25eaacc3d1@gmail.com>

abooij/wayland,bitfactor/wayland,bitfactor/wayland,tulcod/wayland,abooij/wayland,sir-murray/wayland,eyolfson/wayland,eyolfson/wayland,sir-murray/wayland,tulcod/wayland,sir-murray/wayland,eyolfson/wayland,mchalupa/wayland,tulcod/wayland,abooij/wayland,mchalupa/wayland,mchalupa/wayland,bitfactor/wayland