Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
augeas: fix crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Zronek committed Nov 18, 2019
1 parent c375b92 commit 71ddd6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/augeas/augeas.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ int elektraAugeasGet (Plugin * handle, KeySet * returned, Key * parentKey)
{
fclose (fh);
ELEKTRA_SET_INSTALLATION_ERROR (parentKey, getAugeasError (augeasHandle));
errno = errnosave;
return -1;
}

/* convert the augeas tree to an Elektra KeySet */
Expand Down Expand Up @@ -535,6 +537,8 @@ int elektraAugeasGet (Plugin * handle, KeySet * returned, Key * parentKey)
fclose (fh);
ksDel (append);
ELEKTRA_SET_INSTALLATION_ERROR (parentKey, getAugeasError (augeasHandle));
errno = errnosave;
return -1;
}

fclose (fh);
Expand Down Expand Up @@ -587,6 +591,8 @@ int elektraAugeasSet (Plugin * handle, KeySet * returned, Key * parentKey)
{
fclose (fh);
ELEKTRA_SET_INSTALLATION_ERROR (parentKey, getAugeasError (augeasHandle));
errno = errnosave;
return -1;
}
}

Expand Down

0 comments on commit 71ddd6b

Please sign in to comment.