mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
parent
91cc4a1900
commit
142ef0e829
@ -557,7 +557,7 @@ size_t count_chars(const char *s,char c)
|
||||
{
|
||||
smb_ucs2_t *ptr;
|
||||
int count;
|
||||
smb_ucs2_t *alloc_tmpbuf;
|
||||
smb_ucs2_t *alloc_tmpbuf = NULL;
|
||||
|
||||
if (push_ucs2_allocate(&alloc_tmpbuf, s) == (size_t)-1) {
|
||||
return 0;
|
||||
@ -567,6 +567,7 @@ size_t count_chars(const char *s,char c)
|
||||
if(*ptr==UCS2_CHAR(c))
|
||||
count++;
|
||||
|
||||
SAFE_FREE(alloc_tmpbuf);
|
||||
return(count);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user