[PATCH] Handle kit_strdup failure.
Jim Meyering
meyering at redhat.com
Tue Mar 4 05:21:29 PST 2008
* tools/polkit-policy-file-validate.c (validate_file):
Signed-off-by: Jim Meyering <meyering at redhat.com>
---
tools/polkit-policy-file-validate.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/polkit-policy-file-validate.c b/tools/polkit-policy-file-validate.c
index c70de17..e77bbdd 100644
--- a/tools/polkit-policy-file-validate.c
+++ b/tools/polkit-policy-file-validate.c
@@ -99,7 +99,8 @@ validate_file (const char *file)
basename++;
else
basename = file;
- prefix = kit_strdup (basename);
+ if ((prefix = kit_strdup (basename)) == NULL)
+ goto out;
/* strip out "policy" - retain the dot */
prefix [strlen (prefix) - 6] = '\0';
--
1.5.4.3.448.ga661
--=-=-=--
More information about the hal
mailing list