Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed invalid use of ndpi_free(). Sorry, my fault. #1988

Merged
merged 2 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/third_party/src/gcrypt/aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int mbedtls_aesni_has_support( unsigned int what )
break; /* We giveup */
}

ndpi_free(line);
free(line); // Do not replace with ndpi_free(). See `man 3 getline`.
fclose(fd);

has_aesni_checked = 1;
Expand Down
16 changes: 15 additions & 1 deletion utils/check_symbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,21 @@ for line in `nm -P -u "${NDPI_LIB}"`; do
if [ ! -z "${FOUND_SYMBOL}" ]; then
SKIP=0
case "${CURRENT_OBJECT}" in
'[ndpi_utils.o]'|'[ndpi_memory.o]'|'[roaring.o]') SKIP=1 ;;
'[roaring.o]')
case "${FOUND_SYMBOL}" in
'malloc'|'calloc'|'realloc'|'free') SKIP=1 ;;
esac
;;
'[ndpi_utils.o]'|'[ndpi_memory.o]'|'[roaring.o]')
case "${FOUND_SYMBOL}" in
'malloc'|'calloc'|'free') SKIP=1 ;;
esac
;;
'[gcrypt_light.o]')
case "${FOUND_SYMBOL}" in
'free') SKIP=1 ;;
esac
;;
esac

if [ ${SKIP} -eq 0 ]; then
Expand Down