projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
memcpy: free buffer in case of failure
[fio.git]
/
lib
/
memcpy.c
diff --git
a/lib/memcpy.c
b/lib/memcpy.c
index 8164ba0913e45880341c67c528a2cff2f0a1e0d6..48484390e315f372177afc290530742075449393 100644
(file)
--- a/
lib/memcpy.c
+++ b/
lib/memcpy.c
@@
-189,8
+189,11
@@
static int setup_tests(void)
src = malloc(BUF_SIZE);
dst = malloc(BUF_SIZE);
- if (!src || !dst)
+ if (!src || !dst) {
+ free(src);
+ free(dst);
return 1;
+ }
init_rand_seed(&state, 0x8989, 0);
fill_random_buf(&state, src, BUF_SIZE);