view osdep/gettimeofday.c @ 21776:f43ed7e03b06

Fix double free of *http_hdr at server error. In http.c::http_streaming_start() *http_hdr is allocated then assigned to stream->streaming_ctrl->data if server returns error *http_hdr is freed before function returns. However the copy in ->data remains and is later freed (again) by network.c::streaming_ctrl_free().
author iive
date Sat, 30 Dec 2006 13:23:39 +0000
parents 08cac43f1e38
children 936209c39ed1
line wrap: on
line source

#include "config.h"

#ifndef HAVE_GETTIMEOFDAY
#include <sys/time.h>
#include <sys/timeb.h>
void gettimeofday(struct timeval* t,void* timezone)
{       struct timeb timebuffer;
        ftime( &timebuffer );
        t->tv_sec=timebuffer.time;
        t->tv_usec=1000*timebuffer.millitm;
}
#endif