Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
57af0b92
Commit
57af0b92
authored
Aug 19, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cred: add a free function wrapper
parent
47ed7e5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
include/git2/transport.h
+11
-0
src/transports/cred.c
+8
-0
No files found.
include/git2/transport.h
View file @
57af0b92
...
...
@@ -307,6 +307,17 @@ GIT_EXTERN(int) git_cred_ssh_key_memory_new(
const
char
*
privatekey
,
const
char
*
passphrase
);
/**
* Free a credential.
*
* This is only necessary if you own the object; that is, if you are a
* transport.
*
* @param cred the object to free
*/
GIT_EXTERN
(
void
)
git_cred_free
(
git_cred
*
cred
);
/**
* Signature of a function which acquires a credential object.
*
...
...
src/transports/cred.c
View file @
57af0b92
...
...
@@ -378,3 +378,11 @@ int git_cred_username_new(git_cred **cred, const char *username)
*
cred
=
(
git_cred
*
)
c
;
return
0
;
}
void
git_cred_free
(
git_cred
*
cred
)
{
if
(
!
cred
)
return
;
cred
->
free
(
cred
);
}
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