Subj : New Defects reported by Coverity Scan for Synchronet To : cov-scan@synchro.net From : scan-admin@coverity.com Date : Wed Feb 07 2024 13:48:34 Hi, Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan. 1 new defect(s) introduced to Synchronet found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 486181: (RESOURCE_LEAK) /js_bbs.cpp: 1730 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)() /js_bbs.cpp: 1732 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)() ________________________________________________________________________________________________________ *** CID 486181: (RESOURCE_LEAK) /js_bbs.cpp: 1730 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)() 1724 if (instr == NULL) 1725 return JS_FALSE; 1726 1727 if(JSVAL_IS_OBJECT(argv[1]) && !JSVAL_IS_NULL(argv[1])) { 1728 JSObject* hdrobj; 1729 if((hdrobj = JSVAL_TO_OBJECT(argv[1])) == NULL) >>> CID 486181: (RESOURCE_LEAK) >>> Variable "instr" going out of scope leaks the storage it points to. 1730 return JS_FALSE; 1731 if(!js_GetMsgHeaderObjectPrivates(cx, hdrobj, /* smb_t: */NULL, &msg, /* post: */NULL)) 1732 return JS_FALSE; 1733 } 1734 1735 rc = JS_SUSPENDREQUEST(cx); /js_bbs.cpp: 1732 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)() 1726 1727 if(JSVAL_IS_OBJECT(argv[1]) && !JSVAL_IS_NULL(argv[1])) { 1728 JSObject* hdrobj; 1729 if((hdrobj = JSVAL_TO_OBJECT(argv[1])) == NULL) 1730 return JS_FALSE; 1731 if(!js_GetMsgHeaderObjectPrivates(cx, hdrobj, /* smb_t: */NULL, &msg, /* post: */NULL)) >>> CID 486181: (RESOURCE_LEAK) >>> Variable "instr" going out of scope leaks the storage it points to. 1732 return JS_FALSE; 1733 } 1734 1735 rc = JS_SUSPENDREQUEST(cx); 1736 sbbs->expand_atcodes(instr, result, sizeof result, msg); 1737 free(instr); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DmylI_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDXJXQdHoPdhvgvF0Vb847O95f-2F78EIoUagepOVq0LGxVFLDoLOCCiMG-2Fo4JxZOKwjHbMnoOXJKKkCjtFcCkE7VRLhxJ-2FNLJW4jwAN0Jl-2F3no6moASPMez-2F6bxuKm8Qy55QwIHngsrpIdU6tJlGz6f2tQot6J2A4fn-2FWICSVomHTA-3D-3D --- SBBSecho 3.20-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .