Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[deliverable/linux.git] / fs / dlm / lowcomms.c
index 1ab012a27d9f3b209e6d943741a0f9b9c974201d..963016c8f3d12def89c9803eb9d124caa2385dc4 100644 (file)
@@ -1279,10 +1279,9 @@ static void init_local(void)
                if (dlm_our_addr(&sas, i))
                        break;
 
-               addr = kmalloc(sizeof(*addr), GFP_NOFS);
+               addr = kmemdup(&sas, sizeof(*addr), GFP_NOFS);
                if (!addr)
                        break;
-               memcpy(addr, &sas, sizeof(*addr));
                dlm_local_addr[dlm_local_count++] = addr;
        }
 }
This page took 0.027607 seconds and 5 git commands to generate.