diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2023-04-12 08:29:23 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2023-04-12 08:29:23 -0400 |
commit | 53c0742d1840957ccf61a69edd9d0196035fb636 (patch) | |
tree | 0bda7bd7f708d997208f06519e8e68620e90c406 | |
parent | 520f4564da41723513b49d72e307f5843dfecb2b (diff) | |
download | elfutils-53c0742d1840957ccf61a69edd9d0196035fb636.tar.gz |
merge tweak #3
-rw-r--r-- | debuginfod/debuginfod-client.c | 5 | ||||
-rwxr-xr-x | tests/run-debuginfod-find-metadata.sh | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index a2be3edf..cbe44851 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -1833,6 +1833,7 @@ debuginfod_query_server_by_buildid (debuginfod_client *c, curl_multi_remove_handle(curlm, data[i].handle); /* ok to repeat */ curl_easy_cleanup (data[i].handle); free(data[i].response_data); + data[i].response_data = NULL; } free(c->winning_headers); c->winning_headers = NULL; @@ -2325,7 +2326,9 @@ int debuginfod_find_metadata (debuginfod_client *client, data[i].client = client; data[i].metadata = NULL; data[i].metadata_size = 0; - + data[i].response_data = NULL; + data[i].response_data_size = 0; + snprintf(data[i].url, PATH_MAX, "%s?%s", server_url, key_and_value); r = init_handle(client, metadata_callback, header_callback, &data[i], i, timeout, vfd); diff --git a/tests/run-debuginfod-find-metadata.sh b/tests/run-debuginfod-find-metadata.sh index f75d5d99..9ac396ad 100755 --- a/tests/run-debuginfod-find-metadata.sh +++ b/tests/run-debuginfod-find-metadata.sh @@ -20,7 +20,7 @@ # for test case debugging, uncomment: set -x -unset VALGRIND_CMD +# unset VALGRIND_CMD type curl 2>/dev/null || { echo "need curl"; exit 77; } type jq 2>/dev/null || { echo "need jq"; exit 77; } @@ -39,7 +39,7 @@ mkdir R D cp -rvp ${abs_srcdir}/debuginfod-rpms/rhel7 R cp -rvp ${abs_srcdir}/debuginfod-debs/*deb D -env LD_LIBRARY_PATH=$ldpath DEBUGINFOD_URLS= ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -R \ +env LD_LIBRARY_PATH=$ldpath DEBUGINFOD_URLS= ${VALGRIND_CMD} ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -R \ -d $DB -p $PORT1 -t0 -g0 R > vlog$PORT1 2>&1 & PID1=$! tempfiles vlog$PORT1 @@ -50,7 +50,7 @@ wait_ready $PORT1 'thread_work_total{role="traverse"}' 1 wait_ready $PORT1 'thread_work_pending{role="scan"}' 0 wait_ready $PORT1 'thread_busy{role="scan"}' 0 -env LD_LIBRARY_PATH=$ldpath DEBUGINFOD_URLS="http://127.0.0.1:$PORT1 https://bad/url.web" ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -U \ +env LD_LIBRARY_PATH=$ldpath DEBUGINFOD_URLS="http://127.0.0.1:$PORT1 https://bad/url.web" ${VALGRIND_CMD} ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -U \ -d ${DB}_2 -p $PORT2 -t0 -g0 D > vlog$PORT2 2>&1 & PID2=$! tempfiles vlog$PORT2 |