GetTokenInformation() and FreeSid() at port/exec.c

Поиск
Список
Период
Сортировка
От TAKATSUKA Haruka
Тема GetTokenInformation() and FreeSid() at port/exec.c
Дата
Msg-id 20090623103639.1eca170c.harukat@sraoss.co.jp
обсуждение исходный текст
Ответы Re: GetTokenInformation() and FreeSid() at port/exec.c  (Andrew Chernow <ac@esilo.com>)
Список pgsql-bugs
Hi.

We found the unbalance of xxAlloc and xxFree at AddUserToDacl() in
src/port/exec.c (of current HEAD code).

psidUser is a pointer of the element of a TOKEN_USER structure
allocated by  HeapAlloc().  The FreeSid() frees a SID allocated by
AllocateAndInitializeSid().  I think that it is correct to use
HeapFree(GetProcessHeap(), 0, pTokenUser).

At present, a specific error, crash or trouble seems not to have happened.


src/port/exec.c:748     AddUserToDacl()
src/port/exec.c:841      GetUserSid()
        pTokenUser = (PTOKEN_USER) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwLength);

src/port/exec.c:807      AddUserToDacl()
    FreeSid(psidUser);

______________________________________________________________________
 TAKATSUKA Haruka  harukat@sraoss.co.jp
 SRA OSS, Inc  http://www.sraoss.co.jp

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: BUG #4869: No proper initialization of OpenSSL-Engine in libpq
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: GetTokenInformation() and FreeSid() at port/exec.c