gthread: Fix use of a local variable after it went out of scope
gthread: Fix use of a local variable after it went out of scope

This could theoretically cause problems, although in practice we would
have seen them by now (the bug was introduced in 2012).

Coverity issue: #1159486

https://bugzilla.gnome.org/show_bug.cgi?id=730277

ieei/glib,cention-sany/glib,mzabaluev/glib,ieei/glib,tamaskenez/glib,tchakabam/glib,endlessm/glib,gale320/glib,Distrotech/glib,krichter722/glib,krichter722/glib,cention-sany/glib,tamaskenez/glib,lukasz-skalski/glib,lukasz-skalski/glib,gale320/glib,endlessm/glib,cention-sany/glib,tamaskenez/glib,MathieuDuponchelle/glib,johne53/MB3Glib,mzabaluev/glib,krichter722/glib,ieei/glib,Distrotech/glib,tchakabam/glib,tchakabam/glib,mzabaluev/glib,lukasz-skalski/glib,Distrotech/glib,endlessm/glib,gale320/glib,Distrotech/glib,Distrotech/glib,ieei/glib,endlessm/glib,tchakabam/glib,MathieuDuponchelle/glib,johne53/MB3Glib,johne53/MB3Glib,cention-sany/glib,cention-sany/glib,tamaskenez/glib,lukasz-skalski/glib,krichter722/glib,mzabaluev/glib,johne53/MB3Glib,krichter722/glib,tamaskenez/glib,gale320/glib,johne53/MB3Glib,MathieuDuponchelle/glib,MathieuDuponchelle/glib,endlessm/glib,gale320/glib,johne53/MB3Glib,tchakabam/glib,lukasz-skalski/glib,MathieuDuponchelle/glib,mzabaluev/glib,ieei/glib