src/manifest: fix leaking hooks string list variables
src/manifest: fix leaking hooks string list variables

This fixes memory leaks introduced by PR #719 (commit f0f8a335) and
reported by coverity:

| *** CID 1452216:  Resource leaks  (RESOURCE_LEAK)
| /src/manifest.c: 86 in parse_image()
| 80     	g_key_file_remove_group(key_file, group, NULL);
| 81
| 82     	res = TRUE;
| 83     	*image = g_steal_pointer(&iimage);
| 84
| 85     out:
| >>>     CID 1452216:  Resource leaks  (RESOURCE_LEAK)
| >>>     Variable "hooks" going out of scope leaks the storage it points to.
| 86     	return res;
| 87     }
| 88
| 89     /* Parses key_file into RaucManifest structure
| 90      *
| 91      * key_file - input key file
|
| ** CID 1452215:  Resource leaks  (RESOURCE_LEAK)
| /src/manifest.c: 258 in parse_manifest()

The above-mentioned commit made the function return earlier in case of
an error which will then bypass the cleanup of the variables with
g_strfreev().

Both fix and simplify this by using auto cleanup functionality here,
too.

Signed-off-by: Enrico Jorns <a2e5f936c390f36494e46e71bcfbe365bb1e8c49@pengutronix.de>

jluebbe/rauc,ejoerns/rauc,jluebbe/rauc,rauc/rauc,rauc/rauc,ejoerns/rauc,jluebbe/rauc,ejoerns/rauc,rauc/rauc