Because they're not needed, because we fixed the underlying issue, and now they cause a double free!
ret = EXIT_FAILURE;
}
- /*
- * Must be last, we still need the errors
- * from fr_touch.
- */
- fr_strerror_free();
-
/*
* Explicitly free the autofree context
* to make errors less confusing.
fr_dict_free(&dict);
- fr_strerror_free();
-
if (receipt_file && (ret == EXIT_SUCCESS) && (fr_touch(NULL, receipt_file, 0644, true, 0755) <= 0)) {
fr_perror("unit_test_map");
ret = EXIT_FAILURE;
ret = EXIT_FAILURE;
}
- /*
- * Explicitly cleanup the buffer used for storing syserror messages
- * This cuts down on address sanitiser output on error.
- */
- fr_syserror_free();
-
return ret;
}
talloc_free(prefix);
}
-/** Explicitly free the memory used by fr_strerror
- *
- * Note that this function is ONLY called in single-threaded mode,
- * and then ONLY when the main thread does not call pthread_exit(NULL)
- */
-void fr_strerror_free(void)
-{
- TALLOC_FREE(fr_strerror_buffer);
- logging_stop = true;
-}
-
#ifdef TESTING_STRERROR
/*
* cc strerror.c -g3 -Wall -DTESTING_STRERROR -L/usr/local/lib -L ../../../build/lib/local/.libs/ -lfreeradius-util -I/usr/local/include -I../../ -I../ -include ../include/build.h -l talloc -o test_strerror && ./test_strerror
char const *fr_strerror_pop(void);
void fr_perror(char const *, ...) CC_HINT(format (printf, 1, 2));
-void fr_strerror_free(void);
#ifdef __cplusplus
}
}
#endif
}
-
-/** Explicitly cleanup the thread specific buffer used
- *
- */
-void fr_syserror_free(void)
-{
- _fr_logging_free(NULL);
-}
-
#include <string.h>
char const *fr_syserror(int num);
-void fr_syserror_free(void);
#ifdef __cplusplus
}