Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
libspectre
libspectre
Commits
6928e893
Commit
6928e893
authored
Dec 26, 2020
by
Albert Astals Cid
Browse files
Free the previous user_image in case spectre_presize is called multiple times
parent
155777e3
Pipeline
#328784
passed with stage
in 4 minutes and 36 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
libspectre/spectre-device.c
View file @
6928e893
...
...
@@ -72,6 +72,7 @@ spectre_presize (void *handle, void *device, int width, int height,
sd
->
height
=
height
;
sd
->
row_length
=
raster
;
sd
->
gs_image
=
NULL
;
free
(
sd
->
user_image
);
sd
->
user_image
=
malloc
(
sd
->
row_length
*
sd
->
height
);
return
0
;
...
...
Write
Preview
Supports
Markdown
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