Changeset 32592


Ignore:
Timestamp:
Jul 7, 2017, 11:22:15 PM (3 weeks ago)
Author:
kong
Message:

fix mem corruption seems to fix webserver crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/httpd.c

    r32588 r32592  
    556556{
    557557        webs_t conn_fp = (webs_t)arg;
    558         char *cur;
     558        char *cur = NULL;
    559559        char *method, *path, *protocol, *authorization, *boundary, *referer, *host, *useragent, *language;
    560         char *cp;
     560        char *cp = NULL;
    561561        char *file = NULL;
    562562        FILE *exec;
    563563        int len;
    564         struct mime_handler *handler;
     564        struct mime_handler *handler = NULL;;
    565565        int cl = 0, count, flags;
    566566        char *line;
     
    10881088
    10891089#ifndef HAVE_MICRO
    1090         if (handler->input)
    1091                 pthread_mutex_unlock(&input_mutex);     //releases barrier
     1090        if(handler)
     1091                if (handler->input)
     1092                        pthread_mutex_unlock(&input_mutex);     //releases barrier
    10921093#endif
    10931094
     
    15371538                        fprintf(stderr, "Failed to create thread\n");
    15381539                pthread_attr_destroy(&attr);
     1540                free(thread);
    15391541
    15401542//              conn_fp->do_ssl = do_ssl;
     
    17931795int wfclose(webs_t wp)
    17941796{
    1795         int ret;
     1797        int ret = 0;
    17961798        FILE *fp = wp->fp;
    17971799
Note: See TracChangeset for help on using the changeset viewer.