From 71ddd6b3d1fc820dd1532ad8174b449d67b66684 Mon Sep 17 00:00:00 2001 From: Michael Zronek Date: Mon, 18 Nov 2019 10:07:26 +0100 Subject: [PATCH] augeas: fix crashes --- src/plugins/augeas/augeas.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/augeas/augeas.c b/src/plugins/augeas/augeas.c index 8985ee2b37f..504253c04ac 100644 --- a/src/plugins/augeas/augeas.c +++ b/src/plugins/augeas/augeas.c @@ -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 */ @@ -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); @@ -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; } }