projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74bdc4a
)
src/mathutils.c: return NULL on error
author
Paul Brossier
<piem@piem.org>
Mon, 2 Dec 2013 03:03:54 +0000
(22:03 -0500)
committer
Paul Brossier
<piem@piem.org>
Mon, 2 Dec 2013 03:03:54 +0000
(22:03 -0500)
src/mathutils.c
patch
|
blob
|
history
diff --git
a/src/mathutils.c
b/src/mathutils.c
index
86d8f1a
..
f106156
100644
(file)
--- a/
src/mathutils.c
+++ b/
src/mathutils.c
@@
-49,7
+49,14
@@
fvec_t *
new_aubio_window (char_t * window_type, uint_t length)
{
fvec_t * win = new_fvec (length);
new_aubio_window (char_t * window_type, uint_t length)
{
fvec_t * win = new_fvec (length);
- fvec_set_window (win, window_type);
+ if (win == NULL) {
+ return NULL;
+ }
+ uint_t err = fvec_set_window (win, window_type);
+ if (err != 0) {
+ del_fvec(win);
+ return NULL;
+ }
return win;
}
return win;
}