summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ring.c b/ring.c
index 620f490..5fb9daa 100644
--- a/ring.c
+++ b/ring.c
@@ -67,11 +67,11 @@ size_t ringConsumer(const char *name) {
 
 	if (consumers.len == consumers.cap) {
 		consumers.cap = (consumers.cap ? consumers.cap * 2 : 8);
-		// FIXME: Keep old pointer around for saving when exiting for error.
-		consumers.ptr = realloc(
+		void *ptr = realloc(
 			consumers.ptr, sizeof(*consumers.ptr) * consumers.cap
 		);
-		if (!consumers.ptr) err(EX_OSERR, "realloc");
+		if (!ptr) err(EX_OSERR, "realloc");
+		consumers.ptr = ptr;
 	}
 
 	struct Consumer *consumer = &consumers.ptr[consumers.len];
r class='nohover-highlight'> 2016-09-12Add .bin/xx.cJune McEnroe 2016-09-08Rename colorscheme to lameJune McEnroe 2016-09-04Simplify colors syntax in zsh promptJune McEnroe 2016-08-29Color rubyStringDelimiter as StringJune McEnroe 2016-08-24Highlight rubyDefine as StructureJune McEnroe 2016-08-23Remove scroll bindings from nvim configJune McEnroe 2016-08-17Highlight Search with black foregroundJune McEnroe 2016-08-15Remove gruvboxJune McEnroe 2016-08-04Remove march from SSH configJune McEnroe 2016-08-01Disable tab indicators in iTermJune McEnroe 2016-07-30Color PreProc DarkGreenJune McEnroe 2016-07-29Color Structure and Typedef in grayJune McEnroe 2016-07-27Color comments DarkBlue and LightBlueJune McEnroe 2016-07-27Color macros in yellowJune McEnroe 2016-07-26Colorscheme colors and schemesJune McEnroe 2016-07-26Add ''subtle'' colorschemeJune McEnroe I'm just trying this out. 2016-07-26Add htoprcJune McEnroe 2016-07-24Add may and refactor ssh configJune McEnroe 2016-07-18Disable cursorlineJune McEnroe 2016-07-18Use hard constrast gruvbox darkJune McEnroe 2016-07-15Remove vim configurationJune McEnroe 2016-07-15Add readline to README configurations listJune McEnroe 2016-07-15Add vendor script to READMEJune McEnroe 2016-07-15Pull latest pathogen and gruvboxJune McEnroe