Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1caa627e
Commit
1caa627e
authored
Aug 24, 2012
by
antirez
Browse files
Fix a forget zmalloc_oom() -> zmalloc_oom_handler() replacement.
parent
6fdc6354
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/zmalloc.c
View file @
1caa627e
...
@@ -166,7 +166,7 @@ void *zrealloc(void *ptr, size_t size) {
...
@@ -166,7 +166,7 @@ void *zrealloc(void *ptr, size_t size) {
realptr
=
(
char
*
)
ptr
-
PREFIX_SIZE
;
realptr
=
(
char
*
)
ptr
-
PREFIX_SIZE
;
oldsize
=
*
((
size_t
*
)
realptr
);
oldsize
=
*
((
size_t
*
)
realptr
);
newptr
=
realloc
(
realptr
,
size
+
PREFIX_SIZE
);
newptr
=
realloc
(
realptr
,
size
+
PREFIX_SIZE
);
if
(
!
newptr
)
zmalloc_oom
(
size
);
if
(
!
newptr
)
zmalloc_oom
_handler
(
size
);
*
((
size_t
*
)
newptr
)
=
size
;
*
((
size_t
*
)
newptr
)
=
size
;
update_zmalloc_stat_free
(
oldsize
);
update_zmalloc_stat_free
(
oldsize
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment