Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / READMEs / sai-build-test-flow.png
Author[]Andy Green <andy@warmcat.com> 2026-04-19 20:06 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-04-19 20:06 UTC
Treec3c842da3242bf2979c99e4e36a95340180973b0   Raw Patch
 
CID 503239: FORWARD_NULL
CID 503239: FORWARD_NULL
diff --git a/src/server/s-notification.c b/src/server/s-notification.c index 7b8f279..c697b0e 100644 --- a/src/server/s-notification.c +++ b/src/server/s-notification.c @@ -1063,15 +1063,19 @@ sai_notification_file_upload_cb(void *data, const char *name, LWS_ARRAY_SIZE(saifile_paths)); m = lejp_parse(&saictx, (uint8_t *)pss->sn.saifile, (int)pss->sn.saifile_out_pos); - free(pss->sn.saifile); - pss->sn.saifile = NULL; + if (m < 0) { lwsl_notice("%s: saifile JSON 2 decode failed '%s' (%d)\n", __func__, lejp_error_to_string(m), m); puts(pss->sn.saifile); + free(pss->sn.saifile); + pss->sn.saifile = NULL; return m; } + free(pss->sn.saifile); + pss->sn.saifile = NULL; + lwsl_notice("%s: notification inserted into db\n", __func__); /*
Page fetched 0s ago, creation time: 1ms (vhost etag hits: 0%, cache hits: 0%)