Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
446a6fab
Commit
446a6fab
authored
May 14, 2005
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix memory leaks detected using valgrind
parent
3a7e70de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
ChangeLog
ChangeLog
+3
-0
example.c
examples/example.c
+1
-0
main.c
libvncserver/main.c
+2
-1
rfbserver.c
libvncserver/rfbserver.c
+4
-5
No files found.
ChangeLog
View file @
446a6fab
2005-05-14 Karl Runge <runge@karlrunge.com>
* x11vnc: more work on -scrollcopyrect and -xkb modes.
2005-05-13 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* libvncserver/{main,rfbserver,sockets}.c: fix memory leaks (valgrind)
2005-05-07 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* libvncserver/rfbserver.c: fix memory leak pointed out by Tim Jansen
* libvncserver/{httpd,main,rfbserver,sockets}.c, rfb/rfb.h:
...
...
examples/example.c
View file @
446a6fab
...
...
@@ -258,6 +258,7 @@ void MakeRichCursor(rfbScreenInfoPtr rfbScreen)
c
->
xhot
=
16
;
c
->
yhot
=
24
;
c
->
richSource
=
(
char
*
)
malloc
(
w
*
h
*
bpp
);
c
->
cleanupRichSource
=
TRUE
;
for
(
j
=
0
;
j
<
h
;
j
++
)
{
for
(
i
=
0
;
i
<
w
;
i
++
)
{
c
->
richSource
[
j
*
w
*
bpp
+
i
*
bpp
+
0
]
=
i
*
0xff
/
w
;
...
...
libvncserver/main.c
View file @
446a6fab
...
...
@@ -532,7 +532,7 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
int
width
,
int
height
,
int
bitsPerSample
,
int
samplesPerPixel
,
int
bytesPerPixel
)
{
rfbScreenInfoPtr
screen
=
malloc
(
sizeof
(
rfbScreenInfo
)
);
rfbScreenInfoPtr
screen
=
calloc
(
sizeof
(
rfbScreenInfo
),
1
);
INIT_MUTEX
(
logMutex
);
...
...
@@ -759,6 +759,7 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
if
(
cl
->
sock
>
-
1
)
/* we don't care about maxfd here, because the server goes away */
rfbCloseClient
(
cl
);
rfbReleaseClientIterator
(
iter
);
}
rfbShutdownSockets
(
screen
);
...
...
libvncserver/rfbserver.c
View file @
446a6fab
...
...
@@ -413,7 +413,7 @@ rfbClientConnectionGone(cl)
if
(
cl
->
next
)
cl
->
next
->
prev
=
cl
->
prev
;
if
(
cl
->
sock
)
if
(
cl
->
sock
>
0
)
close
(
cl
->
sock
);
#ifdef LIBVNCSERVER_HAVE_LIBZ
...
...
@@ -610,6 +610,8 @@ rfbProcessClientInitMessage(cl)
return
;
}
memset
(
buf
,
0
,
256
);
si
->
framebufferWidth
=
Swap16IfLE
(
cl
->
screen
->
width
);
si
->
framebufferHeight
=
Swap16IfLE
(
cl
->
screen
->
height
);
si
->
format
=
cl
->
screen
->
serverFormat
;
...
...
@@ -617,10 +619,7 @@ rfbProcessClientInitMessage(cl)
si
->
format
.
greenMax
=
Swap16IfLE
(
si
->
format
.
greenMax
);
si
->
format
.
blueMax
=
Swap16IfLE
(
si
->
format
.
blueMax
);
if
(
strlen
(
cl
->
screen
->
desktopName
)
>
128
)
/* sanity check on desktop name len */
((
char
*
)
cl
->
screen
->
desktopName
)[
128
]
=
0
;
strcpy
(
buf
+
sz_rfbServerInitMsg
,
cl
->
screen
->
desktopName
);
strncpy
(
buf
+
sz_rfbServerInitMsg
,
cl
->
screen
->
desktopName
,
127
);
len
=
strlen
(
buf
+
sz_rfbServerInitMsg
);
si
->
nameLength
=
Swap32IfLE
(
len
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment