blob: 43511704e7c325eefb800cfa5ccde79d05700d1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */
#include <stdlib.h>
typedef struct z_stream_s {
unsigned char *next_out;
} z_stream;
typedef struct gz_stream {
z_stream stream;
unsigned char *outbuf;
} gz_stream;
gz_stream *s;
static void gz_open(const char *path)
{
s->stream.next_out = s->outbuf = (unsigned char *)malloc(16384); /* { dg-bogus "leak" } */
}
void gzopen(const char *path)
{
gz_open(path);
}
|