]> granicus.if.org Git - libtirpc/commitdiff
__nc_error() does not check return value from malloc
authorSigned-off-by: Susant Sahani <ssahani@redhat.com>
Fri, 22 Nov 2013 15:53:41 +0000 (10:53 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 25 Nov 2013 19:10:49 +0000 (14:10 -0500)
Signed-off-by: Susant Sahani <ssahani@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
INSTALL
src/getnetconfig.c

diff --git a/INSTALL b/INSTALL
index a47e36f99815c743900a53253f582ce1361d58eb..8b641e394823ac11d9b95afd89bff35b47f0f808 120000 (symlink)
--- a/INSTALL
+++ b/INSTALL
@@ -1 +1 @@
-/usr/share/automake-1.12/INSTALL
\ No newline at end of file
+/usr/share/automake-1.13/INSTALL
\ No newline at end of file
index af4a48449dbf8c67219f816de95577128417af4e..2460a6e0d6f4729044cbd556000ccdc3f1ee519b 100644 (file)
@@ -146,7 +146,8 @@ __nc_error()
                        return (&nc_error);
        }
        if ((nc_addr = (int *)thr_getspecific(nc_key)) == NULL) {
-               nc_addr = (int *)malloc(sizeof (int));
+               if((nc_addr = (int *)malloc(sizeof (int))) == NULL)
+                       return (&nc_error);
                if (thr_setspecific(nc_key, (void *) nc_addr) != 0) {
                        if (nc_addr)
                                free(nc_addr);