Click here to Skip to main content
15,913,334 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Determining privilege levels of running process Pin
adara18-Aug-02 5:54
adara18-Aug-02 5:54 
GeneralRe: Determining privilege levels of running process Pin
Daniel Lohmann18-Aug-02 10:19
Daniel Lohmann18-Aug-02 10:19 
GeneralUsing MSDN from .NET with MSVC6 Pin
Marcin Jakubowski18-Aug-02 4:52
Marcin Jakubowski18-Aug-02 4:52 
GeneralRe: Using MSDN from .NET with MSVC6 Pin
Michael P Butler18-Aug-02 8:11
Michael P Butler18-Aug-02 8:11 
GeneralDebug Assertion in Debug DLL (not Release) Pin
User 665818-Aug-02 3:45
User 665818-Aug-02 3:45 
GeneralRe: Debug Assertion in Debug DLL (not Release) Pin
User 665818-Aug-02 4:11
User 665818-Aug-02 4:11 
GeneralRe: Debug Assertion in Debug DLL (not Release) Pin
Chris Losinger18-Aug-02 17:34
professionalChris Losinger18-Aug-02 17:34 
GeneralRe: Debug Assertion in Debug DLL (not Release) Pin
Mustafa Demirhan19-Aug-02 13:51
Mustafa Demirhan19-Aug-02 13:51 
I do not understand this part.
GeoIP *gi = (GeoIP *)malloc(sizeof(GeoIP));<br />
gi->cache = (unsigned char*)malloc(sizeof(char) * dat_size);<br />
if (gi->cache != NULL)     <br />
    gi->cache = (unsigned char*)rc_dat;<br />
else     <br />
    gi->cache = NULL;


You allocate some memory and then you loose the pointer because you modify the pointer gi->cache. gi->cache now points to a different location and you cannot delete it if it is not on the heap. Also, you will surely have a memory leak; because you lost the pointer for the newly allocated memory space.

Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix

<nobr>They say I'm lazy but it takes all my time
GeneralProblem with monitoring threads !!! Pin
tongc18-Aug-02 3:41
tongc18-Aug-02 3:41 
GeneralRe: Problem with monitoring threads !!! Pin
valikac18-Aug-02 9:41
valikac18-Aug-02 9:41 
GeneralRe: Problem with monitoring threads !!! Pin
Daniel Lohmann18-Aug-02 10:34
Daniel Lohmann18-Aug-02 10:34 
GeneralRe: Problem with monitoring threads !!! Pin
tongc18-Aug-02 16:41
tongc18-Aug-02 16:41 
GeneralRe: Problem with monitoring threads !!! Pin
Daniel Lohmann19-Aug-02 1:12
Daniel Lohmann19-Aug-02 1:12 
GeneralRe: Problem with monitoring threads !!! Pin
tongc20-Aug-02 5:19
tongc20-Aug-02 5:19 
GeneralRe: Problem with monitoring threads !!! Pin
Daniel Lohmann20-Aug-02 8:32
Daniel Lohmann20-Aug-02 8:32 
GeneralRe: Problem with monitoring threads !!! Pin
Mustafa Demirhan19-Aug-02 13:56
Mustafa Demirhan19-Aug-02 13:56 
GeneralHot/mouseover Pin
DanYELL18-Aug-02 3:33
DanYELL18-Aug-02 3:33 
Questionexcepting a flag???? Pin
Eric Cashwell18-Aug-02 2:39
Eric Cashwell18-Aug-02 2:39 
AnswerRe: excepting a flag???? Pin
tongc18-Aug-02 3:09
tongc18-Aug-02 3:09 
GeneralRe: excepting a flag???? Pin
Eric Cashwell18-Aug-02 3:15
Eric Cashwell18-Aug-02 3:15 
GeneralRe: excepting a flag???? Pin
Eric Cashwell18-Aug-02 4:25
Eric Cashwell18-Aug-02 4:25 
GeneralEasy question (hopefully) Pin
Jh318-Aug-02 2:17
Jh318-Aug-02 2:17 
GeneralRe: Easy question (hopefully) Pin
Stephane Rodriguez.18-Aug-02 2:26
Stephane Rodriguez.18-Aug-02 2:26 
GeneralRe: Easy question (hopefully) Pin
tongc18-Aug-02 3:44
tongc18-Aug-02 3:44 
GeneralAppendChunk question - simple probably Pin
nss17-Aug-02 23:28
nss17-Aug-02 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.