ext/mmd/stack.c in rmultimarkdown-6.2.2.1 vs ext/mmd/stack.c in rmultimarkdown-6.4.0.1
- old
+ new
@@ -85,11 +85,13 @@
}
/// Free the stack
void stack_free(stack * s) {
- free(s->element);
- free(s);
+ if (s) {
+ free(s->element);
+ free(s);
+ }
}
/// Add a new pointer to the stack
void stack_push(stack * s, void * element) {