wrbuf_destroy allows NULL WRBUF passed to it
[yaz-moved-to-github.git] / test / tstwrbuf.c
index 8b94634..af06e40 100644 (file)
 static void tstwrbuf(void)
 {
     int step;
-    WRBUF wr = wrbuf_alloc();
+    WRBUF wr;
 
-    YAZ_CHECK(wr);
+    wr = 0;
+    wrbuf_destroy(wr);
 
+    wr = wrbuf_alloc();
+    YAZ_CHECK(wr);
     wrbuf_destroy(wr);
 
     wr = wrbuf_alloc();