Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-amd64-user



Hi,


Please find the latest report on new defect(s) introduced to NetBSD-amd64-user 
found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 20 of 70 defect(s)


** CID 270049:  Resource leak  (RESOURCE_LEAK)
/gnu/dist/texinfo/info/makedoc.c: 493 in process_one_file()

** CID 270050:  Resource leak  (RESOURCE_LEAK)
/gnu/dist/texinfo/info/makedoc.c: 493 in process_one_file()

** CID 270051:  Resource leak  (RESOURCE_LEAK)
/gnu/dist/texinfo/info/makedoc.c: 493 in process_one_file()

** CID 270560:  Logically dead code  (DEADCODE)
/sys/lib/libsa/close.c: 99 in close()

** CID 272959:  Dereference after null check  (FORWARD_NULL)
/external/bsd/wpa/dist/src/drivers/driver_bsd.c: 856 in bsd_init()

** CID 274829:  Dereference null return value  (NULL_RETURNS)
/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c: 163 in writethread()

** CID 726528:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()

** CID 726530:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1239 in make_canonical(attr_desc *, 
rtx_def *)()

** CID 726531:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3042 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3068 in optimize_attrs()()

** CID 726533:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 878 in check_attr_test(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 878 in check_attr_test(rtx_def *, 
int, int)()

** CID 726534:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1120 in convert_set_attr(rtx_def *, 
insn_def *)()

** CID 726535:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2051 in evaluate_eq_attr(rtx_def *, 
attr_desc *, rtx_def *, int, int)()

** CID 726536:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2754 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2754 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2762 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2762 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2541 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2541 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2715 in simplify_test_exp(rtx_def *, 
int, int)()

** CID 726537:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2661 in simplify_test_exp(rtx_def *, 
int, int)()
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2680 in simplify_test_exp(rtx_def *, 
int, int)()

** CID 726538:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 4960 in make_automaton_attrs()()

** CID 726539:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1089 in 
convert_set_attr_alternative(rtx_def *, insn_def *)()

** CID 726540:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 4634 in write_roots(pair *, bool)()
/external/gpl3/gcc/dist/gcc/gengtype.c: 4634 in write_roots(pair *, bool)()
/external/gpl3/gcc/dist/gcc/gengtype.c: 4709 in write_roots(pair *, bool)()
/external/gpl3/gcc/dist/gcc/gengtype.c: 4709 in write_roots(pair *, bool)()
/external/gpl3/gcc/dist/gcc/gengtype.c: 4634 in write_roots(pair *, bool)()
/external/gpl3/gcc/dist/gcc/gengtype.c: 4709 in write_roots(pair *, bool)()

** CID 726541:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 3642 in write_types(outf *, type *, 
type *, const write_types_data *)()

** CID 726542:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 2260 in 
get_output_file_with_visibility(input_file_st *)()
/external/gpl3/gcc/dist/gcc/gengtype.c: 2270 in 
get_output_file_with_visibility(input_file_st *)()

** CID 726543:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 2260 in 
get_output_file_with_visibility(input_file_st *)()


________________________________________________________________________________________________________
*** CID 270049:  Resource leak  (RESOURCE_LEAK)
/gnu/dist/texinfo/info/makedoc.c: 493 in process_one_file()
487               else
488                 offset++;
489             }
490     
491           offset++;
492           if (offset >= file_size)
>>>     CID 270049:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "func_name" going out of scope leaks the storage it points to.
493             break;
494     
495           doc = (char *)xmalloc (1 + (offset - point));
496           strncpy (doc, buffer + point, offset - point);
497           doc[offset - point] = '\0';
498     

________________________________________________________________________________________________________
*** CID 270050:  Resource leak  (RESOURCE_LEAK)
/gnu/dist/texinfo/info/makedoc.c: 493 in process_one_file()
487               else
488                 offset++;
489             }
490     
491           offset++;
492           if (offset >= file_size)
>>>     CID 270050:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "func_name" going out of scope leaks the storage it points to.
493             break;
494     
495           doc = (char *)xmalloc (1 + (offset - point));
496           strncpy (doc, buffer + point, offset - point);
497           doc[offset - point] = '\0';
498     

________________________________________________________________________________________________________
*** CID 270051:  Resource leak  (RESOURCE_LEAK)
/gnu/dist/texinfo/info/makedoc.c: 493 in process_one_file()
487               else
488                 offset++;
489             }
490     
491           offset++;
492           if (offset >= file_size)
>>>     CID 270051:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "func" going out of scope leaks the storage it points to.
493             break;
494     
495           doc = (char *)xmalloc (1 + (offset - point));
496           strncpy (doc, buffer + point, offset - point);
497           doc[offset - point] = '\0';
498     

________________________________________________________________________________________________________
*** CID 270560:  Logically dead code  (DEADCODE)
/sys/lib/libsa/close.c: 99 in close()
93      f->f_flags = 0;
94      if (err1) {
95              errno = err1;
96              return -1;
97      }
98      if (err2) {
>>>     CID 270560:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "errno = err2;".
99              errno = err2;
100                     return -1;
101             }
102             return 0;

________________________________________________________________________________________________________
*** CID 272959:  Dereference after null check  (FORWARD_NULL)
/external/bsd/wpa/dist/src/drivers/driver_bsd.c: 856 in bsd_init()
850                                __func__);
851                     goto bad;
852             }
853     
854             return drv;
855     bad:
>>>     CID 272959:  Dereference after null check  (FORWARD_NULL)
>>>     Dereferencing null pointer "drv".
856             if (drv->sock_xmit != NULL)
857                     l2_packet_deinit(drv->sock_xmit);
858             if (drv->sock >= 0)
859                     close(drv->sock);
860             if (drv != NULL)
861                     os_free(drv);

________________________________________________________________________________________________________
*** CID 274829:  Dereference null return value  (NULL_RETURNS)
/sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c: 163 in writethread()
157                             else
158                                     toread = off - sizeof(struct 
putter_hdr);
159                     } while (toread);
160     
161                     off = 0;
162                     rv = 0;
>>>     CID 274829:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "fp" = null return value from "fd_getfile(unsigned int)".
163                     fp = fd_getfile(pap->fpfd);
164                     error = dofilewrite(pap->fpfd, fp, buf, 
phdr->pth_framelen,
165                         &off, 0, &rv);
166                     if (error == ENXIO)
167                             goto out;
168                     KASSERT(rv == phdr->pth_framelen);

________________________________________________________________________________________________________
*** CID 726528:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
1136         {
1137           if (XVEC (id->def, id->vec_idx) == NULL)
1138            continue;
1139     
1140           for (i = 0; i < XVECLEN (id->def, id->vec_idx); i++)
1141            {
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "value" in "value = 
>>> id->def->u.fld[id->vec_idx].rt_rtvec->elem[i]" leaks the storage that 
>>> "value" points to.
1142              value = XVECEXP (id->def, id->vec_idx, i);
1143              switch (GET_CODE (value))
1144                {
1145                case SET:
1146                  if (GET_CODE (XEXP (value, 0)) != ATTR)
1147                    {
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()
1174                }
1175     
1176              XVECEXP (id->def, id->vec_idx, i) = value;
1177              XEXP (value, 1) = check_attr_value (XEXP (value, 1), attr);
1178            }
1179         }
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "value" going out of scope leaks the storage it points to.
1180     }
1181     
1182     /* Given a valid expression for an attribute value, remove any 
IF_THEN_ELSE
1183        expressions by converting them into a COND.  This removes cases 
from this
1184        program.  Also, replace an attribute value of "*" with the default 
attribute
1185        value.  */
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1142 in check_defs()()
1136         {
1137           if (XVEC (id->def, id->vec_idx) == NULL)
1138            continue;
1139     
1140           for (i = 0; i < XVECLEN (id->def, id->vec_idx); i++)
1141            {
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "value" in "value = 
>>> id->def->u.fld[id->vec_idx].rt_rtvec->elem[i]" leaks the storage that 
>>> "value" points to.
1142              value = XVECEXP (id->def, id->vec_idx, i);
1143              switch (GET_CODE (value))
1144                {
1145                case SET:
1146                  if (GET_CODE (XEXP (value, 0)) != ATTR)
1147                    {
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1180 in check_defs()()
1174                }
1175     
1176              XVECEXP (id->def, id->vec_idx, i) = value;
1177              XEXP (value, 1) = check_attr_value (XEXP (value, 1), attr);
1178            }
1179         }
>>>     CID 726528:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "value" going out of scope leaks the storage it points to.
1180     }
1181     
1182     /* Given a valid expression for an attribute value, remove any 
IF_THEN_ELSE
1183        expressions by converting them into a COND.  This removes cases 
from this
1184        program.  Also, replace an attribute value of "*" with the default 
attribute
1185        value.  */

________________________________________________________________________________________________________
*** CID 726530:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1239 in make_canonical(attr_desc *, 
rtx_def *)()
1233           {
1234            int allsame = 1;
1235            rtx defval;
1236     
1237            /* First, check for degenerate COND.  */
1238            if (XVECLEN (exp, 0) == 0)
>>>     CID 726530:  Resource leak  (RESOURCE_LEAK)
>>>     Returning without freeing "exp" leaks the storage that it points to.
1239              return make_canonical (attr, XEXP (exp, 1));
1240            defval = XEXP (exp, 1) = make_canonical (attr, XEXP (exp, 1));
1241     
1242            for (i = 0; i < XVECLEN (exp, 0); i += 2)
1243              {
1244                XVECEXP (exp, 0, i) = copy_boolean (XVECEXP (exp, 0, i));

________________________________________________________________________________________________________
*** CID 726531:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3042 in optimize_attrs()()
3036              while (GET_CODE (newexp) == COND)
3037                {
3038                  rtx newexp2 = simplify_cond (newexp, ie->def->insn_code,
3039                                               ie->def->insn_index);
3040                  if (newexp2 == newexp)
3041                    break;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = newexp2" leaks the storage that 
>>> "newexp" points to.
3042                  newexp = newexp2;
3043                }
3044     
3045              rtl_obstack = old;
3046              /* If we created a new value for this instruction, and it's
3047                 cheaper than the old value, and overall cheap, use that
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
3050                 sizes for no much gain.  */
3051              if (newexp != av->value
3052                  && attr_rtx_cost (newexp) < attr_rtx_cost (av->value)
3053                  && attr_rtx_cost (newexp) < 26
3054                 )
3055                {
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = attr_copy_rtx(newexp)" leaks the 
>>> storage that "newexp" points to.
3056                  newexp = attr_copy_rtx (newexp);
3057                  remove_insn_ent (av, ie);
3058                  av = get_attr_value (newexp, attr, ie->def->insn_code);
3059                  iv->av = av;
3060                  insert_insn_ent (av, ie);
3061                }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
3050                 sizes for no much gain.  */
3051              if (newexp != av->value
3052                  && attr_rtx_cost (newexp) < attr_rtx_cost (av->value)
3053                  && attr_rtx_cost (newexp) < 26
3054                 )
3055                {
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = attr_copy_rtx(newexp)" leaks the 
>>> storage that "newexp" points to.
3056                  newexp = attr_copy_rtx (newexp);
3057                  remove_insn_ent (av, ie);
3058                  av = get_attr_value (newexp, attr, ie->def->insn_code);
3059                  iv->av = av;
3060                  insert_insn_ent (av, ie);
3061                }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3056 in optimize_attrs()()
3050                 sizes for no much gain.  */
3051              if (newexp != av->value
3052                  && attr_rtx_cost (newexp) < attr_rtx_cost (av->value)
3053                  && attr_rtx_cost (newexp) < 26
3054                 )
3055                {
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = attr_copy_rtx(newexp)" leaks the 
>>> storage that "newexp" points to.
3056                  newexp = attr_copy_rtx (newexp);
3057                  remove_insn_ent (av, ie);
3058                  av = get_attr_value (newexp, attr, ie->def->insn_code);
3059                  iv->av = av;
3060                  insert_insn_ent (av, ie);
3061                }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
3029              av = iv->av;
3030              ie = iv->ie;
3031              if (GET_CODE (av->value) != COND)
3032                continue;
3033     
3034              rtl_obstack = temp_obstack;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = av->value" leaks the storage that 
>>> "newexp" points to.
3035              newexp = av->value;
3036              while (GET_CODE (newexp) == COND)
3037                {
3038                  rtx newexp2 = simplify_cond (newexp, ie->def->insn_code,
3039                                               ie->def->insn_index);
3040                  if (newexp2 == newexp)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3035 in optimize_attrs()()
3029              av = iv->av;
3030              ie = iv->ie;
3031              if (GET_CODE (av->value) != COND)
3032                continue;
3033     
3034              rtl_obstack = temp_obstack;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Overwriting "newexp" in "newexp = av->value" leaks the storage that 
>>> "newexp" points to.
3035              newexp = av->value;
3036              while (GET_CODE (newexp) == COND)
3037                {
3038                  rtx newexp2 = simplify_cond (newexp, ie->def->insn_code,
3039                                               ie->def->insn_index);
3040                  if (newexp2 == newexp)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 3068 in optimize_attrs()()
3062            }
3063         }
3064     
3065       free (ivbuf);
3066       free (insn_code_values - 2);
3067       insn_code_values = NULL;
>>>     CID 726531:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "newexp" going out of scope leaks the storage it points to.
3068     }
3069     
3070     /* Clear the ATTR_CURR_SIMPLIFIED_P flag in EXP and its 
subexpressions.  */
3071     
3072     static void
3073     clear_struct_flag (rtx x)

________________________________________________________________________________________________________
*** CID 726533:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 878 in check_attr_test(rtx_def *, 
int, int)()
872     
873         case LE:  case LT:  case GT:  case GE:
874         case LEU: case LTU: case GTU: case GEU:
875         case NE:  case EQ:
876           if (GET_CODE (XEXP (exp, 0)) == SYMBOL_REF
877               && GET_CODE (XEXP (exp, 1)) == SYMBOL_REF)
>>>     CID 726533:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(SYMBOL_REF, 
>>> exp->u.fld[0].rt_rtx->u.fld[0].rt_str)" leaks it.
878             exp = attr_rtx (GET_CODE (exp),
879                             attr_rtx (SYMBOL_REF, XSTR (XEXP (exp, 0), 0)),
880                             attr_rtx (SYMBOL_REF, XSTR (XEXP (exp, 1), 0)));
881           /* These cases can't be simplified.  */
882           ATTR_IND_SIMPLIFIED_P (exp) = 1;
883           break;
/external/gpl3/gcc/dist/gcc/genattrtab.c: 878 in check_attr_test(rtx_def *, 
int, int)()
872     
873         case LE:  case LT:  case GT:  case GE:
874         case LEU: case LTU: case GTU: case GEU:
875         case NE:  case EQ:
876           if (GET_CODE (XEXP (exp, 0)) == SYMBOL_REF
877               && GET_CODE (XEXP (exp, 1)) == SYMBOL_REF)
>>>     CID 726533:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(SYMBOL_REF, 
>>> exp->u.fld[1].rt_rtx->u.fld[0].rt_str)" leaks it.
878             exp = attr_rtx (GET_CODE (exp),
879                             attr_rtx (SYMBOL_REF, XSTR (XEXP (exp, 0), 0)),
880                             attr_rtx (SYMBOL_REF, XSTR (XEXP (exp, 1), 0)));
881           /* These cases can't be simplified.  */
882           ATTR_IND_SIMPLIFIED_P (exp) = 1;
883           break;

________________________________________________________________________________________________________
*** CID 726534:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1120 in convert_set_attr(rtx_def *, 
insn_def *)()
1114       /* Process each comma-separated name.  */
1115       name_ptr = XSTR (exp, 1);
1116       n = 0;
1117       while ((p = next_comma_elt (&name_ptr)) != NULL)
1118         XVECEXP (newexp, 1, n++) = attr_rtx (CONST_STRING, p);
1119     
>>>     CID 726534:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "newexp" going out of scope leaks the storage it points to.
1120       return convert_set_attr_alternative (newexp, id);
1121     }
1122     
1123     /* Scan all definitions, checking for validity.  Also, convert any 
SET_ATTR
1124        and SET_ATTR_ALTERNATIVE expressions to the corresponding SET
1125        expressions.  */

________________________________________________________________________________________________________
*** CID 726535:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2051 in evaluate_eq_attr(rtx_def *, 
attr_desc *, rtx_def *, int, int)()
2045            gcc_assert (GET_CODE (exp) == EQ_ATTR);
2046            prefix = attr->enum_name ? attr->enum_name : attr->name;
2047            string = ACONCAT ((prefix, "_", XSTR (exp, 1), NULL));
2048            for (p = string; *p; p++)
2049              *p = TOUPPER (*p);
2050     
>>>     CID 726535:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(SYMBOL_REF, attr_string(string, 
>>> strlen(string)))" leaks it.
2051            newexp = attr_rtx (EQ, value,
2052                               attr_rtx (SYMBOL_REF,
2053                                         DEF_ATTR_STRING (string)));
2054            break;
2055           }
2056     

________________________________________________________________________________________________________
*** CID 726536:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2754 in simplify_test_exp(rtx_def *, 
int, int)()
2748              return simplify_test_exp (exp, insn_code, insn_index);
2749            }
2750     
2751           /* Try to apply De`Morgan's laws.  */
2752           if (GET_CODE (left) == IOR)
2753            {
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(NOT, left->u.fld[0].rt_rtx)" 
>>> leaks it.
2754              newexp = attr_rtx (AND,
2755                                 attr_rtx (NOT, XEXP (left, 0)),
2756                                 attr_rtx (NOT, XEXP (left, 1)));
2757     
2758              newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2759            }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2754 in simplify_test_exp(rtx_def *, 
int, int)()
2748              return simplify_test_exp (exp, insn_code, insn_index);
2749            }
2750     
2751           /* Try to apply De`Morgan's laws.  */
2752           if (GET_CODE (left) == IOR)
2753            {
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(NOT, left->u.fld[1].rt_rtx)" 
>>> leaks it.
2754              newexp = attr_rtx (AND,
2755                                 attr_rtx (NOT, XEXP (left, 0)),
2756                                 attr_rtx (NOT, XEXP (left, 1)));
2757     
2758              newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2759            }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2762 in simplify_test_exp(rtx_def *, 
int, int)()
2756                                 attr_rtx (NOT, XEXP (left, 1)));
2757     
2758              newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2759            }
2760           else if (GET_CODE (left) == AND)
2761            {
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(NOT, left->u.fld[0].rt_rtx)" 
>>> leaks it.
2762              newexp = attr_rtx (IOR,
2763                                 attr_rtx (NOT, XEXP (left, 0)),
2764                                 attr_rtx (NOT, XEXP (left, 1)));
2765     
2766              newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2767            }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2762 in simplify_test_exp(rtx_def *, 
int, int)()
2756                                 attr_rtx (NOT, XEXP (left, 1)));
2757     
2758              newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2759            }
2760           else if (GET_CODE (left) == AND)
2761            {
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(NOT, left->u.fld[1].rt_rtx)" 
>>> leaks it.
2762              newexp = attr_rtx (IOR,
2763                                 attr_rtx (NOT, XEXP (left, 0)),
2764                                 attr_rtx (NOT, XEXP (left, 1)));
2765     
2766              newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2767            }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2541 in simplify_test_exp(rtx_def *, 
int, int)()
2535                {
2536                  rtx tem = left;
2537                  left = right;
2538                  right = tem;
2539                }
2540     
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(AND, left, 
>>> right->u.fld[0].rt_rtx)" leaks it.
2541              newexp = attr_rtx (IOR,
2542                                 attr_rtx (AND, left, XEXP (right, 0)),
2543                                 attr_rtx (AND, left, XEXP (right, 1)));
2544     
2545              return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2546            }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2541 in simplify_test_exp(rtx_def *, 
int, int)()
2535                {
2536                  rtx tem = left;
2537                  left = right;
2538                  right = tem;
2539                }
2540     
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(AND, left, 
>>> right->u.fld[1].rt_rtx)" leaks it.
2541              newexp = attr_rtx (IOR,
2542                                 attr_rtx (AND, left, XEXP (right, 0)),
2543                                 attr_rtx (AND, left, XEXP (right, 1)));
2544     
2545              return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2546            }
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2715 in simplify_test_exp(rtx_def *, 
int, int)()
2709                  /* If just one excluded, IOR a comparison with that one 
to the
2710                     front of the tree.  The others will be eliminated by
2711                     optimization.  We do not want to do this if the insn 
has one
2712                     alternative and we have tested none of them!  */
2713                  left = make_alternative_compare (i);
2714                  right = simplify_and_tree (exp, &left, insn_code, 
insn_index);
>>>     CID 726536:  Resource leak  (RESOURCE_LEAK)
>>>     Ignoring storage allocated by "attr_rtx(NOT, left)" leaks it.
2715                  newexp = attr_rtx (IOR, attr_rtx (NOT, left), right);
2716     
2717                  return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2718                }
2719            }
2720     

________________________________________________________________________________________________________
*** CID 726537:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2661 in simplify_test_exp(rtx_def *, 
int, int)()
2655            {
2656              newexp = attr_rtx (IOR, XEXP (left, 1), XEXP (right, 1));
2657     
2658              left = XEXP (left, 0);
2659              right = newexp;
2660              newexp = attr_rtx (AND, left, right);
>>>     CID 726537:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "right" going out of scope leaks the storage it points to.
2661              return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2662            }
2663     
2664           /* Similarly,
2665                convert (ior (and (y) (x))
2666                             (and (z) (x)))
/external/gpl3/gcc/dist/gcc/genattrtab.c: 2680 in simplify_test_exp(rtx_def *, 
int, int)()
2674            {
2675              newexp = attr_rtx (IOR, XEXP (left, 0), XEXP (right, 0));
2676     
2677              left = newexp;
2678              right = XEXP (right, 1);
2679              newexp = attr_rtx (AND, left, right);
>>>     CID 726537:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "left" going out of scope leaks the storage it points to.
2680              return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index);
2681            }
2682     
2683           /* See if all or all but one of the insn's alternatives are 
specified
2684             in this tree.  Optimize if so.  */
2685     

________________________________________________________________________________________________________
*** CID 726538:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 4960 in make_automaton_attrs()()
4954            {
4955              int j;
4956              char *name;
4957              rtx test = attr_rtx (EQ_ATTR, tune_attr->name, XSTR 
(val->value, 0));
4958     
4959              if (val == tune_attr->default_val)
>>>     CID 726538:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "test" going out of scope leaks the storage it points to.
4960                continue;
4961              for (decl = all_insn_reservs, i = 0;
4962                   decl;
4963                   decl = decl->next)
4964                {
4965                  rtx ctest = test;

________________________________________________________________________________________________________
*** CID 726539:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/genattrtab.c: 1089 in 
convert_set_attr_alternative(rtx_def *, insn_def *)()
1083           XVECEXP (condexp, 0, 2 * i) = attr_eq (alternative_name, p);
1084           XVECEXP (condexp, 0, 2 * i + 1) = XVECEXP (exp, 1, i);
1085         }
1086     
1087       XEXP (condexp, 1) = XVECEXP (exp, 1, i);
1088     
>>>     CID 726539:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "condexp" going out of scope leaks the storage it points to.
1089       return attr_rtx (SET, attr_rtx (ATTR, XSTR (exp, 0)), condexp);
1090     }
1091     
1092     /* Given a SET_ATTR, convert to the appropriate SET.  If a 
comma-separated
1093        list of values is given, convert to SET_ATTR_ALTERNATIVE first.  */
1094     

________________________________________________________________________________________________________
*** CID 726540:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 4634 in write_roots(pair *, bool)()
4628         }
4629     
4630       finish_root_table (flp, "ggc_rc", "LAST_GGC_CACHE_TAB", 
"ggc_cache_tab",
4631                         "gt_ggc_cache_rtab");
4632     
4633       if (!emit_pch)
>>>     CID 726540:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "flp" going out of scope leaks the storage it points to.
4634         return;
4635     
4636       for (v = variables; v; v = v->next)
4637         {
4638           outf_p f = get_output_file_with_visibility (CONST_CAST 
(input_file*,
4639                                                                  
v->line.file));
/external/gpl3/gcc/dist/gcc/gengtype.c: 4634 in write_roots(pair *, bool)()
4628         }
4629     
4630       finish_root_table (flp, "ggc_rc", "LAST_GGC_CACHE_TAB", 
"ggc_cache_tab",
4631                         "gt_ggc_cache_rtab");
4632     
4633       if (!emit_pch)
>>>     CID 726540:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "flp" going out of scope leaks the storage it points to.
4634         return;
4635     
4636       for (v = variables; v; v = v->next)
4637         {
4638           outf_p f = get_output_file_with_visibility (CONST_CAST 
(input_file*,
4639                                                                  
v->line.file));
/external/gpl3/gcc/dist/gcc/gengtype.c: 4709 in write_roots(pair *, bool)()
4703           oprintf (f, "  { &%s, 1, sizeof (%s), NULL, NULL },\n",
4704                   v->name, v->name);
4705         }
4706     
4707       finish_root_table (flp, "pch_rs", "LAST_GGC_ROOT_TAB", 
"ggc_root_tab",
4708                         "gt_pch_scalar_rtab");
>>>     CID 726540:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "flp" going out of scope leaks the storage it points to.
4709     }
4710     
4711     /* TRUE if type S has the GTY variable_size annotation.  */
4712     
4713     static bool
4714     variable_size_p (const type_p s)
/external/gpl3/gcc/dist/gcc/gengtype.c: 4709 in write_roots(pair *, bool)()
4703           oprintf (f, "  { &%s, 1, sizeof (%s), NULL, NULL },\n",
4704                   v->name, v->name);
4705         }
4706     
4707       finish_root_table (flp, "pch_rs", "LAST_GGC_ROOT_TAB", 
"ggc_root_tab",
4708                         "gt_pch_scalar_rtab");
>>>     CID 726540:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "flp" going out of scope leaks the storage it points to.
4709     }
4710     
4711     /* TRUE if type S has the GTY variable_size annotation.  */
4712     
4713     static bool
4714     variable_size_p (const type_p s)
/external/gpl3/gcc/dist/gcc/gengtype.c: 4634 in write_roots(pair *, bool)()
4628         }
4629     
4630       finish_root_table (flp, "ggc_rc", "LAST_GGC_CACHE_TAB", 
"ggc_cache_tab",
4631                         "gt_ggc_cache_rtab");
4632     
4633       if (!emit_pch)
>>>     CID 726540:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "flp" going out of scope leaks the storage it points to.
4634         return;
4635     
4636       for (v = variables; v; v = v->next)
4637         {
4638           outf_p f = get_output_file_with_visibility (CONST_CAST 
(input_file*,
4639                                                                  
v->line.file));
/external/gpl3/gcc/dist/gcc/gengtype.c: 4709 in write_roots(pair *, bool)()
4703           oprintf (f, "  { &%s, 1, sizeof (%s), NULL, NULL },\n",
4704                   v->name, v->name);
4705         }
4706     
4707       finish_root_table (flp, "pch_rs", "LAST_GGC_ROOT_TAB", 
"ggc_root_tab",
4708                         "gt_pch_scalar_rtab");
>>>     CID 726540:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "flp" going out of scope leaks the storage it points to.
4709     }
4710     
4711     /* TRUE if type S has the GTY variable_size annotation.  */
4712     
4713     static bool
4714     variable_size_p (const type_p s)

________________________________________________________________________________________________________
*** CID 726541:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 3642 in write_types(outf *, type *, 
type *, const write_types_data *)()
3636                  else
3637                    error_at_line (&s->u.s.line,
3638                                   "structure alias is not a structure");
3639                  break;
3640                }
3641            if (opt)
>>>     CID 726541:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "s_id_for_tag" going out of scope leaks the storage it points 
>>> to.
3642              continue;
3643     
3644            /* Declare the marker procedure only once.  */
3645            oprintf (output_header,
3646                     "extern void gt_%sx_%s (void *);\n",
3647                     wtd->prefix, s_id_for_tag);

________________________________________________________________________________________________________
*** CID 726542:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 2260 in 
get_output_file_with_visibility(input_file_st *)()
2254       for (r = output_files; r; r = r->next)
2255         if (filename_cmp (r->name, output_name) == 0)
2256           {
2257            inpf->inpoutf = r;
2258            DBGPRINTF ("found r @ %p for output_name %s for_name %s", 
(void*)r,
2259                       output_name, for_name);
>>>     CID 726542:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "for_name" going out of scope leaks the storage it points to.
2260            return r;
2261           }
2262     
2263       /* If not found, create it, and cache it in inpf.  */
2264       r = create_file (for_name, output_name);
2265     
/external/gpl3/gcc/dist/gcc/gengtype.c: 2270 in 
get_output_file_with_visibility(input_file_st *)()
2264       r = create_file (for_name, output_name);
2265     
2266       gcc_assert (r && r->name);
2267       DBGPRINTF ("created r @ %p for output_name %s for_name %s", (void*) 
r,
2268                 output_name, for_name);
2269       inpf->inpoutf = r;
>>>     CID 726542:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "for_name" going out of scope leaks the storage it points to.
2270       return r;
2271     
2272     
2273     }
2274     
2275     /* The name of an output file, suitable for definitions, that can see

________________________________________________________________________________________________________
*** CID 726543:  Resource leak  (RESOURCE_LEAK)
/external/gpl3/gcc/dist/gcc/gengtype.c: 2260 in 
get_output_file_with_visibility(input_file_st *)()
2254       for (r = output_files; r; r = r->next)
2255         if (filename_cmp (r->name, output_name) == 0)
2256           {
2257            inpf->inpoutf = r;
2258            DBGPRINTF ("found r @ %p for output_name %s for_name %s", 
(void*)r,
2259                       output_name, for_name);
>>>     CID 726543:  Resource leak  (RESOURCE_LEAK)
>>>     Variable "output_name" going out of scope leaks the storage it points 
>>> to.
2260            return r;
2261           }
2262     
2263       /* If not found, create it, and cache it in inpf.  */
2264       r = create_file (for_name, output_name);
2265     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
http://scan.coverity.com/projects/1449?tab=overview

To unsubscribe from the email notification for new defects, 
http://scan5.coverity.com/cgi-bin/unsubscribe.py




Home | Main Index | Thread Index | Old Index