diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4675be956..db3e42023 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: cpp config-file: ./.github/codeql/codeql-config.yml @@ -41,4 +41,4 @@ jobs: make - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/picohttp/siduck.c b/picohttp/siduck.c index cee14853e..b5ccad609 100644 --- a/picohttp/siduck.c +++ b/picohttp/siduck.c @@ -82,7 +82,7 @@ int siduck_callback(picoquic_cnx_t* cnx, int ret = 0; siduck_ctx_t * ctx = (siduck_ctx_t*)callback_ctx; - if (ctx == NULL) { + if (ctx == NULL || callback_ctx == picoquic_get_default_callback_context(cnx->quic)) { ctx = siduck_create_ctx(NULL); if (ctx != NULL) { ctx->is_auto_alloc = 1; @@ -91,6 +91,7 @@ int siduck_callback(picoquic_cnx_t* cnx, } else { ret = 0; + } if (ret == 0) {