]> andersk Git - splint.git/blobdiff - test/innerfree.c
Added some new test cases also merged with Dave Evans's tests.
[splint.git] / test / innerfree.c
diff --git a/test/innerfree.c b/test/innerfree.c
new file mode 100644 (file)
index 0000000..c7b7546
--- /dev/null
@@ -0,0 +1,24 @@
+/* Contributed by Matthew Yeates. */
+
+int foo (char *b);
+
+struct s {
+  char *i;
+};
+
+static int redir(struct s *s)
+{
+  s->i = malloc(1 * sizeof(int));
+
+  if (!(s->i))
+    return 1;
+
+  if (0) {
+    free(s->i);
+    return 1;
+  }
+  
+  free (s->i);
+  return 0;
+}
+
This page took 0.290006 seconds and 4 git commands to generate.