Commit Graph

24 Commits

Author SHA1 Message Date
Bi-Ruei, Chiu dcc822a090 Fix duplicate type names generated in headers file
For example, there are many 'enum value_PR' and 'struct value' generated if
a class is instantiated as many instances.

typedef enum value_PR {
    value_PR_NOTHING,    /* No components present */
    .....
} value_PR;

typedef struct ProtocolIE_Field_6563P5 {
    ....
    struct value {
        value_PR present;
        union value_u {
        } choice;

        /* Context for parsing across buffer boundaries */
        asn_struct_ctx_t _asn_ctx;
    } value;

    /* Context for parsing across buffer boundaries */
    asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Field_6563P5_t;
2017-10-20 17:15:57 -07:00
Lev Walkin a45518f565 const fix 2017-08-23 07:22:52 -07:00
Lev Walkin c0e03b946e introduce namespaces 2017-08-22 01:48:23 -07:00
Lev Walkin 4dcf8367d9 refactor constraint matrix handling 2017-08-07 20:10:05 -07:00
Lev Walkin 62d95d2ef4 rm warnings 2017-08-06 23:41:11 -07:00
Lev Walkin ea6635bdae better parsing information object class sets 2017-08-06 23:23:04 -07:00
Lev Walkin da997b1ea1 work in 128-bit integer values while compiling 2017-08-04 01:38:41 -07:00
Bi-Ruei, Chiu 3dcf05bbb0 Fix some memory leakage found 2017-05-05 15:03:32 +08:00
Lev Walkin fbbe4edc8e Merge pull request #126 from brchiu/fix_some_leak_reported_by_valgrind
Fix many memory leaks reported by valgrind
2017-03-26 05:55:00 -07:00
Bi-Ruei, Chiu b9adfc5f91 Free memory allocated in various functions
1. Add 'ref_cnt' field to asn1p_expr_t.
2. Initialize 'ref_cnt' field to zero when asn1p_expr_t is allocated.
3. Increase 'ref_cnt' field when asn1p_expr_t is cloned by asn1p_value_fromtype().
4. If 'ref_cnt' field of asn1p_expr_t is larger than zero, then asn1p_expr_free() only decrease its value.
5. Free memory pointed by fields of asn1p_expr_t and itself when 'ref_cnt' is zero and asn1p_expr_free() called.
6. Call asn1p_delete(asn) in main().
2016-11-09 00:17:25 +08:00
Markus Elfring 671eb9ad14 Bug #86: Deletion of unnecessary checks before a few calls of asn1c functions
The following functions return immediately if a null pointer was passed.
* asn1p_constraint_free
* asn1p_paramlist_free
* asn1p_ref_free
* asn1p_value_free
* asn1p_wsyntx_free

It is therefore not needed that a function caller repeats a corresponding check.

This issue was fixed by using the software "Coccinelle 1.0.4".

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2016-03-14 17:07:26 +01:00
Lev Walkin d8b8364c8a removed unneeded check before free() 2016-03-14 02:00:27 -07:00
Lev Walkin 0e90aa040c parsing-level support for [[ extension brackets ]] 2013-03-19 16:17:13 -07:00
Lev Walkin a9532f4d2b moved -DASN_PDU_COLLECTION into compiler 2006-09-17 04:52:50 +00:00
Lev Walkin 5045dfaba4 ObjectSets 2006-03-21 09:41:28 +00:00
Lev Walkin 0c0bca6bc4 parameterization: direct assignment 2006-03-21 04:48:15 +00:00
Lev Walkin a00d6b3714 refactored parameterization support 2006-03-21 03:40:38 +00:00
Lev Walkin 8f294e0812 fixes 2005-06-06 08:28:58 +00:00
Lev Walkin 7116096839 Compiler support for tagged parametrized members. 2005-06-02 05:21:53 +00:00
Lev Walkin 5498f2d63a extended marker 2004-09-15 11:59:30 +00:00
Lev Walkin 1004aa9462 maintaining parent expression 2004-09-08 00:28:11 +00:00
Lev Walkin 070a52d8ce COMPONENTS OF support and other enhancements 2004-08-22 03:19:54 +00:00
Lev Walkin f59d075dad new style constraints implementation support 2004-08-18 04:59:12 +00:00
Lev Walkin f15320bf6b Initial revision 2004-06-03 03:38:44 +00:00