projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd40ec7
)
isl_stream_new_str: check result of allocation
author
Sven Verdoolaege
<skimo@kotnet.org>
Fri, 25 Jun 2010 14:59:14 +0000
(16:59 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Sat, 26 Jun 2010 15:37:38 +0000
(17:37 +0200)
isl_stream.c
patch
|
blob
|
history
diff --git
a/isl_stream.c
b/isl_stream.c
index
3629610
..
c917fb8
100644
(file)
--- a/
isl_stream.c
+++ b/
isl_stream.c
@@
-140,9
+140,11
@@
struct isl_stream* isl_stream_new_file(struct isl_ctx *ctx, FILE *file)
struct isl_stream* isl_stream_new_str(struct isl_ctx *ctx, const char *str)
{
- struct isl_stream *s = isl_stream_new(ctx);
- s->str = str;
- return s;
+ struct isl_stream *s = isl_stream_new(ctx);
+ if (!s)
+ return NULL;
+ s->str = str;
+ return s;
}
static int isl_stream_getc(struct isl_stream *s)