Ticket #45: sqlite.diff

File sqlite.diff, 0.8 KB (added by smoku, 20 months ago)

Patch by Nicolas Pouillon <nipo@…>

  • sm/storage_sqlite.c

    RCS file: /home/cvs/jabberd2/sm/storage_sqlite.c,v
    retrieving revision 1.2
    diff -u -p -r1.2 storage_sqlite.c
     
    273273            memcpy (&left[nleft], right, nright); 
    274274            nleft += nright; 
    275275            free (right); 
     276            right = NULL; 
     277            lright = 0; 
    276278 
    277279            SQLITE_SAFE_CAT (left, nleft, lleft, " )"); 
    278280 
     
    280282 
    281283            res = sqlite3_prepare (data->db, left, strlen (left), &stmt, NULL); 
    282284            free (left); 
     285            left = NULL; 
     286            lleft = 0; 
    283287            if (res != SQLITE_OK) { 
    284288                log_write (drv->st->sm->log, LOG_ERR, 
    285289                           "sqlite: sql insert failed: %s",