Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d0ba1843
Commit
d0ba1843
authored
May 17, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
May 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gphoto2.ds: Use Win32 APIs instead of strdup().
parent
3d5f1edf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
gphoto2_main.c
dlls/gphoto2.ds/gphoto2_main.c
+10
-3
No files found.
dlls/gphoto2.ds/gphoto2_main.c
View file @
d0ba1843
...
...
@@ -37,6 +37,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
twain
);
static
char
*
GPHOTO2_StrDup
(
const
char
*
str
)
{
char
*
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
strcpy
(
dst
,
str
);
return
dst
;
}
static
void
load_filesystem
(
const
char
*
folder
)
{
#ifdef HAVE_GPHOTO2
...
...
@@ -63,12 +70,12 @@ load_filesystem(const char *folder) {
ret
=
gp_list_get_name
(
list
,
i
,
&
name
);
if
(
ret
<
GP_OK
)
continue
;
gpfile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
gphoto2_file
));
gpfile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
gphoto2_file
));
/* FIXME: Leaked */
if
(
!
gpfile
)
continue
;
TRACE
(
"adding %s/%s
\n
"
,
folder
,
name
);
gpfile
->
folder
=
strd
up
(
folder
);
gpfile
->
filename
=
strd
up
(
name
);
gpfile
->
folder
=
GPHOTO2_StrD
up
(
folder
);
gpfile
->
filename
=
GPHOTO2_StrD
up
(
name
);
gpfile
->
download
=
FALSE
;
list_add_tail
(
&
activeDS
.
files
,
&
gpfile
->
entry
);
}
...
...
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