mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
string: Added a function to delete a char basesd stirng object.
This commit is contained in:
@@ -142,6 +142,15 @@ char *ssh_string_to_char(struct ssh_string_struct *s) {
|
||||
return new;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deallocate a char string object.
|
||||
*
|
||||
* @param[in] s The string to delete.
|
||||
*/
|
||||
void ssh_string_free_char(char *s) {
|
||||
SAFE_FREE(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Copy a string, return a newly allocated string. The caller has to
|
||||
* free the string.
|
||||
|
||||
Reference in New Issue
Block a user