Signed-off-by: Michael Santos <michael.san...@gmail.com>
---
 src/lxc/lxc_monitor.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c
index 314d4a5..1da0906 100644
--- a/src/lxc/lxc_monitor.c
+++ b/src/lxc/lxc_monitor.c
@@ -69,6 +69,10 @@ int main(int argc, char *argv[])
                return -1;
 
        regexp = malloc(strlen(my_args.name) + 3);
+       if (!regexp) {
+               ERROR("failed to allocate memory");
+               return -1;
+       }
        sprintf(regexp, "^%s$", my_args.name);
 
        if (regcomp(&preg, regexp, REG_NOSUB|REG_EXTENDED)) {
-- 
1.7.0.4


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to