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:
cb24a33
)
isl_name_alloc: fix error handling
author
Sven Verdoolaege
<skimo@kotnet.org>
Wed, 12 May 2010 09:29:06 +0000
(11:29 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Thu, 13 May 2010 16:53:54 +0000
(18:53 +0200)
isl_name.c
patch
|
blob
|
history
diff --git
a/isl_name.c
b/isl_name.c
index
21b7ff7
..
8e902db
100644
(file)
--- a/
isl_name.c
+++ b/
isl_name.c
@@
-19,12
+19,15
@@
struct isl_name *isl_name_alloc(struct isl_ctx *ctx, const char *s)
return NULL;
name = isl_alloc_type(ctx, struct isl_name);
if (!name)
-
return NULL
;
+
goto error
;
name->ref = 1;
name->name = copy;
return name;
+error:
+ free((char *)copy);
+ return NULL;
}
static int isl_name_has_name(const void *entry, const void *val)