LCOV - code coverage report
Current view: top level - src/protocol1 - sbuf_protocol1.c (source / functions) Hit Total Coverage
Test: burp-coverage-clean.info Lines: 15 15 100.0 %
Date: 2019-06-30 22:47:48 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       91854 :         iobuf_free_content(&protocol1->datapth);
       9       91854 :         protocol1->datapth.cmd=CMD_DATAPTH;
      10             : }
      11             : 
      12       32298 : struct protocol1 *sbuf_protocol1_alloc(void)
      13             : {
      14             :         struct protocol1 *p;
      15       32298 :         if((p=(struct protocol1 *)calloc_w(1,
      16             :                 sizeof(struct protocol1), __func__)))
      17             :                         sbuf_protocol1_init(p);
      18       32298 :         return p;
      19             : }
      20             : 
      21      229754 : void sbuf_protocol1_free_content(struct protocol1 *protocol1)
      22             : {
      23      229754 :         if(!protocol1) return;
      24       59556 :         memset(&(protocol1->rsbuf), 0, sizeof(protocol1->rsbuf));
      25       59556 :         if(protocol1->sigjob)
      26           2 :                 { rs_job_free(protocol1->sigjob); protocol1->sigjob=NULL; }
      27       59556 :         rs_filebuf_free(&protocol1->infb);
      28       59556 :         rs_filebuf_free(&protocol1->outfb);
      29       59556 :         fzp_close(&protocol1->sigfzp);
      30       59556 :         fzp_close(&protocol1->fzp);
      31       59556 :         protocol1->salt=0;
      32             :         sbuf_protocol1_init(protocol1);
      33             : }

Generated by: LCOV version 1.13