Fix
This commit is contained in:
parent
badad6e71d
commit
0d34eaa9af
@ -8,6 +8,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "capwap_logging.h"
|
#include "capwap_logging.h"
|
||||||
|
#include "capwap_error.h"
|
||||||
|
|
||||||
#define CANARY 0xaaaaaaaa
|
#define CANARY 0xaaaaaaaa
|
||||||
#define BACKTRACE_BUFFER 256
|
#define BACKTRACE_BUFFER 256
|
||||||
@ -37,7 +38,7 @@ void* capwap_alloc_debug(size_t size, const char* file, const int line) {
|
|||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
capwap_logging_debug("%s(%d): Invalid memory size %d", file, line, size);
|
capwap_logging_debug("%s(%d): Invalid memory size %d", file, line, size);
|
||||||
DEBUG_BREAKPOINT();
|
DEBUG_BREAKPOINT();
|
||||||
capwap_exit(CAPWAP_ASSERT_CONDITION);
|
exit(CAPWAP_ASSERT_CONDITION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Alloc block with memory block and canary */
|
/* Alloc block with memory block and canary */
|
||||||
@ -45,7 +46,7 @@ void* capwap_alloc_debug(size_t size, const char* file, const int line) {
|
|||||||
if (!block) {
|
if (!block) {
|
||||||
capwap_logging_debug("Out of memory %s(%d)", file, line);
|
capwap_logging_debug("Out of memory %s(%d)", file, line);
|
||||||
DEBUG_BREAKPOINT();
|
DEBUG_BREAKPOINT();
|
||||||
capwap_exit(CAPWAP_OUT_OF_MEMORY);
|
exit(CAPWAP_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Info memory block */
|
/* Info memory block */
|
||||||
|
Loading…
Reference in New Issue
Block a user