Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
ba714636
Commit
ba714636
authored
19 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Bug-fix: introduced js_sprintf_free() to solve DLL malloc/free issue
(assertion) with jsexec->js_printf(). Sorry Deuce. :-)
parent
b318b141
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/js_sprintf.c
+6
-0
6 additions, 0 deletions
src/sbbs3/js_sprintf.c
src/sbbs3/jsexec.c
+1
-1
1 addition, 1 deletion
src/sbbs3/jsexec.c
src/sbbs3/sbbs.h
+1
-0
1 addition, 0 deletions
src/sbbs3/sbbs.h
with
8 additions
and
1 deletion
src/sbbs3/js_sprintf.c
+
6
−
0
View file @
ba714636
...
...
@@ -65,3 +65,9 @@ js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
return
xp_asprintf_end
(
p
);
}
void
DLLCALL
js_sprintf_free
(
char
*
p
)
{
xp_asprintf_free
(
p
);
}
This diff is collapsed.
Click to expand it.
src/sbbs3/jsexec.c
+
1
−
1
View file @
ba714636
...
...
@@ -357,7 +357,7 @@ js_printf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
*
rval
=
STRING_TO_JSVAL
(
JS_NewStringCopyZ
(
cx
,
p
));
free
(
p
);
js_sprintf_
free
(
p
);
return
(
JS_TRUE
);
}
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/sbbs.h
+
1
−
0
View file @
ba714636
...
...
@@ -1025,6 +1025,7 @@ extern "C" {
/* js_sprintf.c */
DLLEXPORT
char
*
DLLCALL
js_sprintf
(
JSContext
*
cx
,
uint
argn
,
uintN
argc
,
jsval
*
argv
);
DLLEXPORT
void
DLLCALL
js_sprintf_free
(
char
*
);
/* js_console.cpp */
JSObject
*
js_CreateConsoleObject
(
JSContext
*
cx
,
JSObject
*
parent
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment