]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/locking/locktorture.c
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-artful-kernel.git] / kernel / locking / locktorture.c
index 9bffedd8288445bf8bfe9c91c1979506562e1fe3..28350dc8ecbb17a69c932e42b1cf370886c15e85 100644 (file)
@@ -852,6 +852,10 @@ static void lock_torture_cleanup(void)
        else
                lock_torture_print_module_parms(cxt.cur_ops,
                                                "End of test: SUCCESS");
+
+       kfree(cxt.lwsa);
+       kfree(cxt.lrsa);
+
 end:
        torture_cleanup_end();
 }
@@ -997,6 +1001,8 @@ static int __init lock_torture_init(void)
                                       GFP_KERNEL);
                if (reader_tasks == NULL) {
                        VERBOSE_TOROUT_ERRSTRING("reader_tasks: Out of memory");
+                       kfree(writer_tasks);
+                       writer_tasks = NULL;
                        firsterr = -ENOMEM;
                        goto unwind;
                }