LCOV - code coverage report
Current view: top level - src/protocol1 - sbuf_protocol1.c (source / functions) Hit Total Coverage
Test: burp-coverage-clean.info Lines: 14 14 100.0 %
Date: 2016-05-30 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #include "../burp.h"
       2             : #include "sbuf_protocol1.h"
       3             : #include "../alloc.h"
       4             : #include "../cmd.h"
       5             : 
       6             : static void sbuf_protocol1_init(struct protocol1 *protocol1)
       7             : {
       8       90969 :         iobuf_free_content(&protocol1->datapth);
       9       90969 :         protocol1->datapth.cmd=CMD_DATAPTH;
      10             : }
      11             : 
      12       31954 : struct protocol1 *sbuf_protocol1_alloc(void)
      13             : {
      14             :         struct protocol1 *p;
      15       31954 :         if((p=(struct protocol1 *)calloc_w(1,
      16             :                 sizeof(struct protocol1), __func__)))
      17             :                         sbuf_protocol1_init(p);
      18       31954 :         return p;
      19             : }
      20             : 
      21      228873 : void sbuf_protocol1_free_content(struct protocol1 *protocol1)
      22             : {
      23      457746 :         if(!protocol1) return;
      24       59015 :         memset(&(protocol1->rsbuf), 0, sizeof(protocol1->rsbuf));
      25       59015 :         if(protocol1->sigjob)
      26           2 :                 { rs_job_free(protocol1->sigjob); protocol1->sigjob=NULL; }
      27       59015 :         rs_filebuf_free(&protocol1->infb);
      28       59015 :         rs_filebuf_free(&protocol1->outfb);
      29       59015 :         fzp_close(&protocol1->sigfzp);
      30       59015 :         fzp_close(&protocol1->fzp);
      31             :         sbuf_protocol1_init(protocol1);
      32             : }

Generated by: LCOV version 1.10