pike.git / src / modules / Pipe / pipe.c

version» Context lines:

pike.git/src/modules/Pipe/pipe.c:270: Inside #if defined(HAVE_MMAP) && defined(HAVE_MUNMAP)
  #if defined(HAVE_MMAP) && defined(HAVE_MUNMAP)    munmap(i->u.mmap,i->len);    mmapped -= i->len;   #else    Pike_error("I_MMAP input when MMAP is diabled!");   #endif    break;       case I_NONE: break;    } -  free((char *)i); +  free(i);   }      /* do the done_callback, then close and free everything */   static INLINE void pipe_done(void)   {    if (TYPEOF(THIS->done_callback) != T_INT)    {    assign_svalue_no_free(sp++,&THIS->id);    apply_svalue(&(THIS->done_callback),1);    pop_stack();
pike.git/src/modules/Pipe/pipe.c:521:    /* Free the first buffer, and update THIS->pos */    b=this->firstbuffer;    this->pos+=b->s->len;    this->bytes_in_buffer-=b->s->len;    this->firstbuffer=b->next;    if (!b->next)    this->lastbuffer=NULL;    sbuffers-=b->s->len;    nbuffers--;    free_string(b->s); -  free((char *)b); +  free(b);       /* Wake up first input if it was sleeping and we    * have room for more in the buffer.    */    if (this->sleeping &&    this->firstinput &&    this->bytes_in_buffer<MAX_BYTES_IN_BUFFER)    {    if (this->firstinput->type == I_BLOCKING_OBJ) {    if (!read_some_data()) {
pike.git/src/modules/Pipe/pipe.c:915:    bytes = fd_write(THIS->fd, data, len);    } while((bytes < 0) && (errno == EINTR));    if (bytes < 0) break;    len -= bytes;    data += bytes;    }       sbuffers-=b->s->len;    nbuffers--;    free_string(b->s); -  free((char *)b); +  free(b);    }    THIS->lastbuffer=NULL;       /* keep the file pointer of the duped fd    THIS->pos=0; */    push_int(0);    apply(sp[-args-2].u.object,"set_id", 1);    pop_n_elems(args+2); /* ... and from apply x 2 */    return;    }
pike.git/src/modules/Pipe/pipe.c:1207:    add_ref(thisobj); /* don't kill object during this */       while (p->firstbuffer)    {    b=p->firstbuffer;    p->firstbuffer=b->next;    sbuffers-=b->s->len;    nbuffers--;    free_string(b->s);    b->next=NULL; -  free((char *)b); /* Hubbe */ +  free(b); /* Hubbe */    }    p->lastbuffer=NULL;          while (p->firstinput)    {    i=p->firstinput;    p->firstinput=i->next;    free_input(i);    }