]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/dma-buf/sync_file.c
dma-buf: Fix memory leak in sync_file_merge()
[mirror_ubuntu-bionic-kernel.git] / drivers / dma-buf / sync_file.c
index 03830634e141e70782c96ca42945f30babc0283a..bf65e634590b8766b4ade873c0dcdeb2406d5b2f 100644 (file)
@@ -230,7 +230,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
        a_fences = get_fences(a, &a_num_fences);
        b_fences = get_fences(b, &b_num_fences);
        if (a_num_fences > INT_MAX - b_num_fences)
-               return NULL;
+               goto err;
 
        num_fences = a_num_fences + b_num_fences;