Skip to content

Commit

Permalink
src/manifest: fix manifest leaking on error in parse_manifest()
Browse files Browse the repository at this point in the history
Fixes coverity issue:
| CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
  • Loading branch information
ejoerns committed Mar 2, 2022
1 parent cbf8f46 commit 2b7fa08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static gboolean parse_image(GKeyFile *key_file, const gchar *group, RaucImage **
static gboolean parse_manifest(GKeyFile *key_file, RaucManifest **manifest, GError **error)
{
GError *ierror = NULL;
RaucManifest *raucm = g_new0(RaucManifest, 1);
g_autoptr(RaucManifest) raucm = g_new0(RaucManifest, 1);
gboolean res = FALSE;
g_autofree gchar *tmp = NULL;
g_auto(GStrv) groups = NULL;
Expand Down

0 comments on commit 2b7fa08

Please sign in to comment.