[PATCH] src: Avoid needless checks before calling g_strdup()