tests: fix test-iov leaks
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 7 Jul 2016 19:00:05 +0000 (21:00 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 8 Sep 2016 13:57:32 +0000 (17:57 +0400)
Spotted thanks to ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/test-iov.c

index 46ae25efd683131f255bbd7f8bd8e572bc88cb72..a22d71fd2c57c9f15a0c573b422ff9f62db49466 100644 (file)
@@ -208,6 +208,9 @@ static void test_io(void)
                } while(k < j);
            }
        }
+       iov_free(iov, niov);
+       g_free(buf);
+       g_free(siov);
        exit(0);
 
     } else {
@@ -246,6 +249,10 @@ static void test_io(void)
                test_iov_bytes(iov, niov, i, j - i);
            }
         }
+
+       iov_free(iov, niov);
+       g_free(buf);
+       g_free(siov);
      }
 #endif
 }