OSDN Git Service
(root)
/
android-x86
/
external-exfat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9568e2b
)
Fix memory leak on realloc() failure.
author
relan
<relan@users.noreply.github.com>
Fri, 23 May 2014 19:24:13 +0000
(19:24 +0000)
committer
relan
<relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:16 +0000
(08:26 +0300)
In fact reallocf() would do the thing but unfortunetly it's non-standard.
fuse/main.c
patch
|
blob
|
history
diff --git
a/fuse/main.c
b/fuse/main.c
index
b9b412a
..
2f157c4
100644
(file)
--- a/
fuse/main.c
+++ b/
fuse/main.c
@@
-379,6
+379,7
@@
static struct fuse_operations fuse_exfat_ops =
static char* add_option(char* options, const char* name, const char* value)
{
size_t size;
+ char* optionsf = options;
if (value)
size = strlen(options) + strlen(name) + strlen(value) + 3;
@@
-388,6
+389,7
@@
static char* add_option(char* options, const char* name, const char* value)
options = realloc(options, size);
if (options == NULL)
{
+ free(optionsf);
exfat_error("failed to reallocate options string");
return NULL;
}